Skip to content

Commit

Permalink
Merge 4.4.178 into kernel.lnx.4.4.r34-rel
Browse files Browse the repository at this point in the history
Changes in 4.4.178: (132 commits)
        mmc: pxamci: fix enum type confusion
        drm/vmwgfx: Don't double-free the mode stored in par->set_mode
        udf: Fix crash on IO error during truncate
        mips: loongson64: lemote-2f: Add IRQF_NO_SUSPEND to "cascade" irqaction.
        MIPS: Fix kernel crash for R6 in jump label branch function
        futex: Ensure that futex address is aligned in handle_futex_death()
        ext4: fix NULL pointer dereference while journal is aborted
        ext4: fix data corruption caused by unaligned direct AIO
        ext4: brelse all indirect buffer in ext4_ind_remove_space()
        mmc: tmio_mmc_core: don't claim spurious interrupts
        media: v4l2-ctrls.c/uvc: zero v4l2_event
        locking/lockdep: Add debug_locks check in __lock_downgrade()
        ALSA: hda - Record the current power state before suspend/resume calls
        ALSA: hda - Enforces runtime_resume after S3 and S4 for each codec
        mmc: pwrseq_simple: Make reset-gpios optional to match doc
        mmc: debugfs: Add a restriction to mmc debugfs clock setting
        mmc: make MAN_BKOPS_EN message a debug
        mmc: sanitize 'bus width' in debug output
        mmc: core: shut up "voltage-ranges unspecified" pr_info()
        usb: dwc3: gadget: Fix suspend/resume during device mode
        arm64: mm: Add trace_irqflags annotations to do_debug_exception()
        mmc: core: fix using wrong io voltage if mmc_select_hs200 fails
        mm/rmap: replace BUG_ON(anon_vma->degree) with VM_WARN_ON
        extcon: usb-gpio: Don't miss event during suspend/resume
        kbuild: setlocalversion: print error to STDERR
        usb: gadget: composite: fix dereference after null check coverify warning
        usb: gadget: Add the gserial port checking in gs_start_tx()
        tcp/dccp: drop SYN packets if accept queue is full
        serial: sprd: adjust TIMEOUT to a big value
        Hang/soft lockup in d_invalidate with simultaneous calls
        arm64: traps: disable irq in die()
        usb: renesas_usbhs: gadget: fix unused-but-set-variable warning
        serial: sprd: clear timeout interrupt only rather than all interrupts
        lib/int_sqrt: optimize small argument
        USB: core: only clean up what we allocated
        rtc: Fix overflow when converting time64_t to rtc_time
        ath10k: avoid possible string overflow
        Bluetooth: Check L2CAP option sizes returned from l2cap_get_conf_opt
        Bluetooth: Verify that l2cap_get_conf_opt provides large enough buffer
        sched/fair: Fix new task's load avg removed from source CPU in wake_up_new_task()
        mmc: block: Allow more than 8 partitions per card
        arm64: fix COMPAT_SHMLBA definition for large pages
        efi: stub: define DISABLE_BRANCH_PROFILING for all architectures
        ARM: 8458/1: bL_switcher: add GIC dependency
        ARM: 8494/1: mm: Enable PXN when running non-LPAE kernel on LPAE processor
        android: unconditionally remove callbacks in sync_fence_free()
        vmstat: make vmstat_updater deferrable again and shut down on idle
        hid-sensor-hub.c: fix wrong do_div() usage
        arm64: hide __efistub_ aliases from kallsyms
        perf: Synchronously free aux pages in case of allocation failure
        net: diag: support v4mapped sockets in inet_diag_find_one_icsk()
        Revert "mmc: block: don't use parameter prefix if built as module"
        writeback: initialize inode members that track writeback history
        coresight: fixing lockdep error
        coresight: coresight_unregister() function cleanup
        coresight: release reference taken by 'bus_find_device()'
        coresight: remove csdev's link from topology
        stm class: Fix locking in unbinding policy path
        stm class: Fix link list locking
        stm class: Prevent user-controllable allocations
        stm class: Support devices with multiple instances
        stm class: Fix unlocking braino in the error path
        stm class: Guard output assignment against concurrency
        stm class: Fix unbalanced module/device refcounting
        stm class: Fix a race in unlinking
        coresight: "DEVICE_ATTR_RO" should defined as static.
        coresight: etm4x: Check every parameter used by dma_xx_coherent.
        asm-generic: Fix local variable shadow in __set_fixmap_offset
        staging: ashmem: Avoid deadlock with mmap/shrink
        staging: ashmem: Add missing include
        staging: ion: Set minimum carveout heap allocation order to PAGE_SHIFT
        staging: goldfish: audio: fix compiliation on arm
        ARM: 8510/1: rework ARM_CPU_SUSPEND dependencies
        arm64/kernel: fix incorrect EL0 check in inv_entry macro
        mac80211: fix "warning: ‘target_metric’ may be used uninitialized"
        perf/ring_buffer: Refuse to begin AUX transaction after rb->aux_mmap_count drops
        arm64: kernel: Include _AC definition in page.h
        PM / Hibernate: Call flush_icache_range() on pages restored in-place
        stm class: Do not leak the chrdev in error path
        stm class: Fix stm device initialization order
        ipv6: fix endianness error in icmpv6_err
        usb: gadget: configfs: add mutex lock before unregister gadget
        usb: gadget: rndis: free response queue during REMOTE_NDIS_RESET_MSG
        cpu/hotplug: Handle unbalanced hotplug enable/disable
        video: fbdev: Set pixclock = 0 in goldfishfb
        arm64: kconfig: drop CONFIG_RTC_LIB dependency
        mmc: mmc: fix switch timeout issue caused by jiffies precision
        cfg80211: size various nl80211 messages correctly
        stmmac: copy unicast mac address to MAC registers
        dccp: do not use ipv6 header for ipv4 flow
        mISDN: hfcpci: Test both vendor & device ID for Digium HFC4S
        net/packet: Set __GFP_NOWARN upon allocation in alloc_pg_vec
        net: rose: fix a possible stack overflow
        Add hlist_add_tail_rcu() (Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net)
        packets: Always register packet sk in the same order
        tcp: do not use ipv6 header for ipv4 flow
        vxlan: Don't call gro_cells_destroy() before device is unregistered
        sctp: get sctphdr by offset in sctp_compute_cksum
        mac8390: Fix mmio access size probe
        btrfs: remove WARN_ON in log_dir_items
        btrfs: raid56: properly unmap parity page in finish_parity_scrub()
        ARM: imx6q: cpuidle: fix bug that CPU might not wake up at expected time
        ALSA: compress: add support for 32bit calls in a 64bit kernel
        ALSA: rawmidi: Fix potential Spectre v1 vulnerability
        ALSA: seq: oss: Fix Spectre v1 vulnerability
        ALSA: pcm: Fix possible OOB access in PCM oss plugins
        ALSA: pcm: Don't suspend stream in unrecoverable PCM state
        scsi: sd: Fix a race between closing an sd device and sd I/O
        scsi: zfcp: fix rport unblock if deleted SCSI devices on Scsi_Host
        scsi: zfcp: fix scsi_eh host reset with port_forced ERP for non-NPIV FCP devices
        tty: atmel_serial: fix a potential NULL pointer dereference
        staging: vt6655: Remove vif check from vnt_interrupt
        staging: vt6655: Fix interrupt race condition on device start up.
        serial: max310x: Fix to avoid potential NULL pointer dereference
        serial: sh-sci: Fix setting SCSCR_TIE while transferring data
        USB: serial: cp210x: add new device id
        USB: serial: ftdi_sio: add additional NovaTech products
        USB: serial: mos7720: fix mos_parport refcount imbalance on error path
        USB: serial: option: set driver_info for SIM5218 and compatibles
        USB: serial: option: add Olicard 600
        Disable kgdboc failed by echo space to /sys/module/kgdboc/parameters/kgdboc
        fs/proc/proc_sysctl.c: fix NULL pointer dereference in put_links
        gpio: adnp: Fix testing wrong value in adnp_gpio_direction_input
        perf intel-pt: Fix TSC slip
        x86/smp: Enforce CONFIG_HOTPLUG_CPU when SMP=y
        KVM: Reject device ioctls from processes other than the VM's creator
        xhci: Fix port resume done detection for SS ports with LPM enabled
        Revert "USB: core: only clean up what we allocated"
        arm64: support keyctl() system call in 32-bit mode
        coresight: removing bind/unbind options from sysfs
        stm class: Hide STM-specific options if STM is disabled
        Linux 4.4.178

Signed-off-by: Nathan Chancellor <[email protected]>

Conflicts:
	arch/arm/Kconfig
	arch/arm64/kernel/image.h
	arch/arm64/kernel/traps.c
	drivers/hwtracing/coresight/coresight-etm4x.c
	drivers/hwtracing/coresight/coresight-tmc.c
	drivers/hwtracing/stm/Kconfig
	drivers/hwtracing/stm/core.c
	drivers/mmc/core/mmc.c
	drivers/usb/gadget/configfs.c
	drivers/usb/gadget/function/u_serial.c
	drivers/video/fbdev/goldfishfb.c
	kernel/events/ring_buffer.c
	kernel/sched/fair.c
	mm/vmstat.c
	net/wireless/nl80211.c
	sound/core/compress_offload.c
  • Loading branch information
nathanchance committed Apr 3, 2019
2 parents 86f9e18 + 12ae58c commit 9415f72
Show file tree
Hide file tree
Showing 87 changed files with 561 additions and 339 deletions.
16 changes: 11 additions & 5 deletions Documentation/virtual/kvm/api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ of a virtual machine. The ioctls belong to three classes

- VM ioctls: These query and set attributes that affect an entire virtual
machine, for example memory layout. In addition a VM ioctl is used to
create virtual cpus (vcpus).
create virtual cpus (vcpus) and devices.

Only run VM ioctls from the same process (address space) that was used
to create the VM.
Expand All @@ -24,6 +24,11 @@ of a virtual machine. The ioctls belong to three classes
Only run vcpu ioctls from the same thread that was used to create the
vcpu.

- device ioctls: These query and set attributes that control the operation
of a single device.

device ioctls must be issued from the same process (address space) that
was used to create the VM.

2. File descriptors
-------------------
Expand All @@ -32,10 +37,11 @@ The kvm API is centered around file descriptors. An initial
open("/dev/kvm") obtains a handle to the kvm subsystem; this handle
can be used to issue system ioctls. A KVM_CREATE_VM ioctl on this
handle will create a VM file descriptor which can be used to issue VM
ioctls. A KVM_CREATE_VCPU ioctl on a VM fd will create a virtual cpu
and return a file descriptor pointing to it. Finally, ioctls on a vcpu
fd can be used to control the vcpu, including the important task of
actually running guest code.
ioctls. A KVM_CREATE_VCPU or KVM_CREATE_DEVICE ioctl on a VM fd will
create a virtual cpu or device and return a file descriptor pointing to
the new resource. Finally, ioctls on a vcpu or device fd can be used
to control the vcpu or device. For vcpus, this includes the important
task of actually running guest code.

In general file descriptors can be migrated among processes by means
of fork() and the SCM_RIGHTS facility of unix domain socket. These
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VERSION = 4
PATCHLEVEL = 4
SUBLEVEL = 177
SUBLEVEL = 178
EXTRAVERSION =
NAME = Blurry Fish Butt

Expand Down
27 changes: 10 additions & 17 deletions arch/arm/mach-imx/cpuidle-imx6q.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,23 @@
#include "cpuidle.h"
#include "hardware.h"

static atomic_t master = ATOMIC_INIT(0);
static DEFINE_SPINLOCK(master_lock);
static int num_idle_cpus = 0;
static DEFINE_SPINLOCK(cpuidle_lock);

static int imx6q_enter_wait(struct cpuidle_device *dev,
struct cpuidle_driver *drv, int index)
{
if (atomic_inc_return(&master) == num_online_cpus()) {
/*
* With this lock, we prevent other cpu to exit and enter
* this function again and become the master.
*/
if (!spin_trylock(&master_lock))
goto idle;
spin_lock(&cpuidle_lock);
if (++num_idle_cpus == num_online_cpus())
imx6_set_lpm(WAIT_UNCLOCKED);
cpu_do_idle();
imx6_set_lpm(WAIT_CLOCKED);
spin_unlock(&master_lock);
goto done;
}
spin_unlock(&cpuidle_lock);

idle:
cpu_do_idle();
done:
atomic_dec(&master);

spin_lock(&cpuidle_lock);
if (num_idle_cpus-- == num_online_cpus())
imx6_set_lpm(WAIT_CLOCKED);
spin_unlock(&cpuidle_lock);

return index;
}
Expand Down
5 changes: 4 additions & 1 deletion arch/arm64/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ config ARM64
select PERF_USE_VMALLOC
select POWER_RESET
select POWER_SUPPLY
select RTC_LIB
select SPARSE_IRQ
select SYSCTL_EXCEPTION_TRACE
select HAVE_CONTEXT_TRACKING
Expand Down Expand Up @@ -1201,6 +1200,10 @@ config SYSVIPC_COMPAT
def_bool y
depends on COMPAT && SYSVIPC

config KEYS_COMPAT
def_bool y
depends on COMPAT && KEYS

endmenu

menu "Power management options"
Expand Down
33 changes: 23 additions & 10 deletions arch/arm64/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -686,20 +686,33 @@ asmlinkage int __exception do_debug_exception(unsigned long addr,
{
const struct fault_info *inf = debug_fault_info + DBG_ESR_EVT(esr);
struct siginfo info;
int rv;

if (!inf->fn(addr, esr, regs))
return 1;
/*
* Tell lockdep we disabled irqs in entry.S. Do nothing if they were
* already disabled to preserve the last enabled/disabled addresses.
*/
if (interrupts_enabled(regs))
trace_hardirqs_off();

pr_alert("Unhandled debug exception: %s (0x%08x) at 0x%016lx\n",
inf->name, esr, addr);
if (!inf->fn(addr, esr, regs)) {
rv = 1;
} else {
pr_alert("Unhandled debug exception: %s (0x%08x) at 0x%016lx\n",
inf->name, esr, addr);

info.si_signo = inf->sig;
info.si_errno = 0;
info.si_code = inf->code;
info.si_addr = (void __user *)addr;
arm64_notify_die("", regs, &info, 0);
rv = 0;
}

info.si_signo = inf->sig;
info.si_errno = 0;
info.si_code = inf->code;
info.si_addr = (void __user *)addr;
arm64_notify_die("", regs, &info, 0);
if (interrupts_enabled(regs))
trace_hardirqs_on();

return 0;
return rv;
}
NOKPROBE_SYMBOL(do_debug_exception);

Expand Down
8 changes: 4 additions & 4 deletions arch/mips/include/asm/jump_label.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
#endif

#ifdef CONFIG_CPU_MICROMIPS
#define NOP_INSN "nop32"
#define B_INSN "b32"
#else
#define NOP_INSN "nop"
#define B_INSN "b"
#endif

static __always_inline bool arch_static_branch(struct static_key *key, bool branch)
{
asm_volatile_goto("1:\t" NOP_INSN "\n\t"
"nop\n\t"
asm_volatile_goto("1:\t" B_INSN " 2f\n\t"
"2:\tnop\n\t"
".pushsection __jump_table, \"aw\"\n\t"
WORD_INSN " 1b, %l[l_yes], %0\n\t"
".popsection\n\t"
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/loongson64/lemote-2f/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ static struct irqaction ip6_irqaction = {
static struct irqaction cascade_irqaction = {
.handler = no_action,
.name = "cascade",
.flags = IRQF_NO_THREAD,
.flags = IRQF_NO_THREAD | IRQF_NO_SUSPEND,
};

void __init mach_init_irq(void)
Expand Down
8 changes: 1 addition & 7 deletions arch/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1993,14 +1993,8 @@ config PHYSICAL_ALIGN
Don't change this unless you know what you are doing.

config HOTPLUG_CPU
bool "Support for hot-pluggable CPUs"
def_bool y
depends on SMP
---help---
Say Y here to allow turning CPUs off and on. CPUs can be
controlled through /sys/devices/system/cpu.
( Note: power management support will enable this option
automatically on SMP systems. )
Say N if you want to disable CPU hotplug.

config BOOTPARAM_HOTPLUG_CPU0
bool "Set default setting of cpu0_hotpluggable"
Expand Down
3 changes: 3 additions & 0 deletions drivers/extcon/extcon-usb-gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,9 @@ static int usb_extcon_resume(struct device *dev)
}

enable_irq(info->id_irq);
if (!device_may_wakeup(dev))
queue_delayed_work(system_power_efficient_wq,
&info->wq_detcable, 0);

return ret;
}
Expand Down
6 changes: 4 additions & 2 deletions drivers/gpio/gpio-adnp.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,10 @@ static int adnp_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
if (err < 0)
goto out;

if (err & BIT(pos))
err = -EACCES;
if (value & BIT(pos)) {
err = -EPERM;
goto out;
}

err = 0;

Expand Down
12 changes: 3 additions & 9 deletions drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -531,11 +531,9 @@ static int vmw_fb_set_par(struct fb_info *info)
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC)
};
struct drm_display_mode *old_mode;
struct drm_display_mode *mode;
int ret;

old_mode = par->set_mode;
mode = drm_mode_duplicate(vmw_priv->dev, &new_mode);
if (!mode) {
DRM_ERROR("Could not create new fb mode.\n");
Expand All @@ -546,11 +544,7 @@ static int vmw_fb_set_par(struct fb_info *info)
mode->vdisplay = var->yres;
vmw_guess_mode_timing(mode);

if (old_mode && drm_mode_equal(old_mode, mode)) {
drm_mode_destroy(vmw_priv->dev, mode);
mode = old_mode;
old_mode = NULL;
} else if (!vmw_kms_validate_mode_vram(vmw_priv,
if (!vmw_kms_validate_mode_vram(vmw_priv,
mode->hdisplay *
DIV_ROUND_UP(var->bits_per_pixel, 8),
mode->vdisplay)) {
Expand Down Expand Up @@ -613,8 +607,8 @@ static int vmw_fb_set_par(struct fb_info *info)
schedule_delayed_work(&par->local_work, 0);

out_unlock:
if (old_mode)
drm_mode_destroy(vmw_priv->dev, old_mode);
if (par->set_mode)
drm_mode_destroy(vmw_priv->dev, par->set_mode);
par->set_mode = mode;

drm_modeset_unlock_all(vmw_priv->dev);
Expand Down
11 changes: 1 addition & 10 deletions drivers/hwtracing/coresight/coresight-etb10.c
Original file line number Diff line number Diff line change
Expand Up @@ -489,15 +489,6 @@ static int etb_probe(struct amba_device *adev, const struct amba_id *id)
return ret;
}

static int etb_remove(struct amba_device *adev)
{
struct etb_drvdata *drvdata = amba_get_drvdata(adev);

misc_deregister(&drvdata->miscdev);
coresight_unregister(drvdata->csdev);
return 0;
}

#ifdef CONFIG_PM
static int etb_runtime_suspend(struct device *dev)
{
Expand Down Expand Up @@ -537,10 +528,10 @@ static struct amba_driver etb_driver = {
.name = "coresight-etb10",
.owner = THIS_MODULE,
.pm = &etb_dev_pm_ops,
.suppress_bind_attrs = true,

},
.probe = etb_probe,
.remove = etb_remove,
.id_table = etb_ids,
};

Expand Down
13 changes: 1 addition & 12 deletions drivers/hwtracing/coresight/coresight-etm3x.c
Original file line number Diff line number Diff line change
Expand Up @@ -1877,17 +1877,6 @@ static int etm_probe(struct amba_device *adev, const struct amba_id *id)
return ret;
}

static int etm_remove(struct amba_device *adev)
{
struct etm_drvdata *drvdata = amba_get_drvdata(adev);

coresight_unregister(drvdata->csdev);
if (--etm_count == 0)
unregister_hotcpu_notifier(&etm_cpu_notifier);

return 0;
}

#ifdef CONFIG_PM
static int etm_runtime_suspend(struct device *dev)
{
Expand Down Expand Up @@ -1948,9 +1937,9 @@ static struct amba_driver etm_driver = {
.name = "coresight-etm3x",
.owner = THIS_MODULE,
.pm = &etm_dev_pm_ops,
.suppress_bind_attrs = true,
},
.probe = etm_probe,
.remove = etm_remove,
.id_table = etm_ids,
};

Expand Down
2 changes: 1 addition & 1 deletion drivers/hwtracing/coresight/coresight-etm4x.c
Original file line number Diff line number Diff line change
Expand Up @@ -2240,7 +2240,7 @@ static ssize_t name##_show(struct device *_dev, \
return scnprintf(buf, PAGE_SIZE, "0x%x\n", \
readl_relaxed(drvdata->base + offset)); \
} \
DEVICE_ATTR_RO(name)
static DEVICE_ATTR_RO(name)

coresight_cross_read(trcoslsr, TRCOSLSR);
coresight_cross_read(trcpdcr, TRCPDCR);
Expand Down
10 changes: 1 addition & 9 deletions drivers/hwtracing/coresight/coresight-funnel.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,14 +226,6 @@ static int funnel_probe(struct amba_device *adev, const struct amba_id *id)
return 0;
}

static int funnel_remove(struct amba_device *adev)
{
struct funnel_drvdata *drvdata = amba_get_drvdata(adev);

coresight_unregister(drvdata->csdev);
return 0;
}

#ifdef CONFIG_PM
static int funnel_runtime_suspend(struct device *dev)
{
Expand Down Expand Up @@ -273,9 +265,9 @@ static struct amba_driver funnel_driver = {
.name = "coresight-funnel",
.owner = THIS_MODULE,
.pm = &funnel_dev_pm_ops,
.suppress_bind_attrs = true,
},
.probe = funnel_probe,
.remove = funnel_remove,
.id_table = funnel_ids,
};

Expand Down
11 changes: 1 addition & 10 deletions drivers/hwtracing/coresight/coresight-replicator-qcom.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,15 +156,6 @@ static int replicator_probe(struct amba_device *adev, const struct amba_id *id)
return 0;
}

static int replicator_remove(struct amba_device *adev)
{
struct replicator_state *drvdata = amba_get_drvdata(adev);

pm_runtime_disable(&adev->dev);
coresight_unregister(drvdata->csdev);
return 0;
}

#ifdef CONFIG_PM
static int replicator_runtime_suspend(struct device *dev)
{
Expand Down Expand Up @@ -206,9 +197,9 @@ static struct amba_driver replicator_driver = {
.drv = {
.name = "coresight-replicator-qcom",
.pm = &replicator_dev_pm_ops,
.suppress_bind_attrs = true,
},
.probe = replicator_probe,
.remove = replicator_remove,
.id_table = replicator_ids,
};

Expand Down
Loading

0 comments on commit 9415f72

Please sign in to comment.