[PATCH 4.9 189/223] kallsyms: exclude kasan local symbols on s390

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit 33177f01ca3fe550146bb9001bec2fd806b2f40c ] gcc asan instrumentation emits the following sequence to store frame pc when the kernel is built with CONFIG_RELOCATABLE: debug/vsprintf.s: .section.data.rel.ro.local,"aw" .align 8 .LC3: .quad

[PATCH 4.9 084/223] regulator: s2mps11: Fix buck7 and buck8 wrong voltages

2019-08-02 Thread Greg Kroah-Hartman
From: Krzysztof Kozlowski commit 16da0eb5ab6ef2dd1d33431199126e63db9997cc upstream. On S2MPS11 device, the buck7 and buck8 regulator voltages start at 750 mV, not 600 mV. Using wrong minimal value caused shifting of these regulator values by 150 mV (e.g. buck7 usually configured to v1.35 V was

[PATCH 4.9 190/223] perf test mmap-thread-lookup: Initialize variable to suppress memory sanitizer warning

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit 4e4cf62b37da5ff45c904a3acf242ab29ed5881d ] Running the 'perf test' command after building perf with a memory sanitizer causes a warning that says: WARNING: MemorySanitizer: use-of-uninitialized-value... in mmap-thread-lookup.c Initializing the go variable to 0 silences this

[PATCH 4.9 181/223] mfd: core: Set fwnode for created devices

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit c176c6d7e932662668bcaec2d763657096589d85 ] The logic for setting the of_node on devices created by mfd did not set the fwnode pointer to match, which caused fwnode-based APIs to malfunction on these devices since the fwnode pointer was null. Fix this. Signed-off-by: Robert

[PATCH 4.9 180/223] recordmcount: Fix spurious mcount entries on powerpc

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit 80e5302e4bc85a6b685b7668c36c6487b5f90e9a ] An impending change to enable HAVE_C_RECORDMCOUNT on powerpc leads to warnings such as the following: # modprobe kprobe_example ftrace-powerpc: Not expected bl: opcode is 3c4c0001 WARNING: CPU: 0 PID: 227 at

[PATCH 4.9 197/223] mm/kmemleak.c: fix check for softirq context

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit 6ef9056952532c3b746de46aa10d45b4d7797bd8 ] in_softirq() is a wrong predicate to check if we are in a softirq context. It also returns true if we have BH disabled, so objects are falsely stamped with "softirq" comm. The correct predicate is in_serving_softirq(). If user does

[PATCH 4.9 187/223] serial: sh-sci: Terminate TX DMA during buffer flushing

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit 775b7ffd7d6d5db320d99b0a485c51e04dfcf9f1 ] While the .flush_buffer() callback clears sci_port.tx_dma_len since commit 1cf4a7efdc71cab8 ("serial: sh-sci: Fix race condition causing garbage during shutdown"), it does not terminate a transmit DMA operation that may be in progress.

[PATCH 4.9 200/223] locking/lockdep: Fix lock used or unused stats error

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit 68d41d8c94a31dfb8233ab90b9baf41a2ed2da68 ] The stats variable nr_unused_locks is incremented every time a new lock class is register and decremented when the lock is first used in __lock_acquire(). And after all, it is shown and checked in lockdep_stats. However, under

[PATCH 4.9 205/223] x86/speculation/mds: Apply more accurate check on hypervisor platform

2019-08-02 Thread Greg Kroah-Hartman
From: Zhenzhong Duan commit 517c3ba00916383af6411aec99442c307c23f684 upstream. X86_HYPER_NATIVE isn't accurate for checking if running on native platform, e.g. CONFIG_HYPERVISOR_GUEST isn't set or "nopv" is enabled. Checking the CPU feature bit X86_FEATURE_HYPERVISOR to determine if it's

[PATCH 4.9 204/223] x86/sysfb_efi: Add quirks for some devices with swapped width and height

2019-08-02 Thread Greg Kroah-Hartman
From: Hans de Goede commit d02f1aa39189e0619c3525d5cd03254e61bf606a upstream. Some Lenovo 2-in-1s with a detachable keyboard have a portrait screen but advertise a landscape resolution and pitch, resulting in a messed up display if the kernel tries to show anything on the efifb (because of the

[PATCH 4.9 203/223] usb: pci-quirks: Correct AMD PLL quirk detection

2019-08-02 Thread Greg Kroah-Hartman
From: Ryan Kennedy commit f3dccdaade4118070a3a47bef6b18321431f9ac6 upstream. The AMD PLL USB quirk is incorrectly enabled on newer Ryzen chipsets. The logic in usb_amd_find_chipset_info currently checks for unaffected chipsets rather than affected ones. This broke once a new chipset was added

[PATCH 4.9 209/223] powerpc/tm: Fix oops on sigreturn on systems without TM

2019-08-02 Thread Greg Kroah-Hartman
From: Michael Neuling commit f16d80b75a096c52354c6e0a574993f3b0dfbdfe upstream. On systems like P9 powernv where we have no TM (or P8 booted with ppc_tm=off), userspace can construct a signal context which still has the MSR TS bits set. The kernel tries to restore this context which results in

[PATCH 4.9 208/223] ALSA: hda - Add a conexant codec entry to let mute led work

2019-08-02 Thread Greg Kroah-Hartman
From: Hui Wang commit 3f8809499bf02ef7874254c5e23fc764a47a21a0 upstream. This conexant codec isn't in the supported codec list yet, the hda generic driver can drive this codec well, but on a Lenovo machine with mute/mic-mute leds, we need to apply CXT_FIXUP_THINKPAD_ACPI to make the leds work.

[PATCH 4.19 02/32] vsock: correct removal of socket from the list

2019-08-02 Thread Greg Kroah-Hartman
From: Sunil Muthuswamy commit d5afa82c977ea06f7119058fa0eb8519ea501031 upstream. The current vsock code for removal of socket from the list is both subject to race and inefficient. It takes the lock, checks whether the socket is in the list, drops the lock and if the socket was on the list,

[PATCH 4.19 01/32] hv_sock: Add support for delayed close

2019-08-02 Thread Greg Kroah-Hartman
From: Sunil Muthuswamy commit a9eeb998c28d5506616426bd3a216bd5735a18b8 upstream. Currently, hvsock does not implement any delayed or background close logic. Whenever the hvsock socket is closed, a FIN is sent to the peer, and the last reference to the socket is dropped, which leads to a call to

[PATCH 4.14 08/25] arm64: compat: Provide definition for COMPAT_SIGMINSTKSZ

2019-08-02 Thread Greg Kroah-Hartman
From: Will Deacon commit 24951465cbd279f60b1fdc2421b3694405bcff42 upstream. arch/arm/ defines a SIGMINSTKSZ of 2k, so we should use the same value for compat tasks. Cc: Arnd Bergmann Cc: Dominik Brodowski Cc: "Eric W. Biederman" Cc: Andrew Morton Cc: Al Viro Cc: Oleg Nesterov

[PATCH 4.19 21/32] vhost_net: fix possible infinite loop

2019-08-02 Thread Greg Kroah-Hartman
From: Jason Wang commit e2412c07f8f3040593dfb88207865a3cd58680c0 upstream. When the rx buffer is too small for a packet, we will discard the vq descriptor and retry it for the next packet: while ((sock_len = vhost_net_rx_peek_head_len(net, sock->sk,

[PATCH 4.14 25/25] sched/fair: Use RCU accessors consistently for ->numa_group

2019-08-02 Thread Greg Kroah-Hartman
From: Jann Horn commit cb361d8cdef69990f6b4504dc1fd9a594d983c97 upstream. The old code used RCU annotations and accessors inconsistently for ->numa_group, which can lead to use-after-frees and NULL dereferences. Let all accesses to ->numa_group use proper RCU helpers to prevent such issues.

[PATCH 4.19 15/32] NFS: Cleanup if nfs_match_client is interrupted

2019-08-02 Thread Greg Kroah-Hartman
From: Benjamin Coddington commit 9f7761cf0409465075dadb875d5d4b8ef2f890c8 upstream. Don't bail out before cleaning up a new allocation if the wait for searching for a matching nfs client is interrupted. Memory leaks. Reported-by: syzbot+7fe11b49c1cc30e3f...@syzkaller.appspotmail.com Fixes:

[PATCH 5.2 13/20] Bluetooth: hci_uart: check for missing tty operations

2019-08-02 Thread Greg Kroah-Hartman
From: Vladis Dronov commit b36a1552d7319bbfd5cf7f08726c23c5c66d4f73 upstream. Certain ttys operations (pty_unix98_ops) lack tiocmget() and tiocmset() functions which are called by the certain HCI UART protocols (hci_ath, hci_bcm, hci_intel, hci_mrvl, hci_qca) via hci_uart_set_flow_control() or

[PATCH 4.19 03/32] NFS: Fix dentry revalidation on NFSv4 lookup

2019-08-02 Thread Greg Kroah-Hartman
From: Trond Myklebust commit be189f7e7f03de35887e5a85ddcf39b91b5d7fc1 upstream. We need to ensure that inode and dentry revalidation occurs correctly on reopen of a file that is already open. Currently, we can end up not revalidating either in the case of NFSv4.0, due to the 'cached open' path.

[PATCH 4.19 04/32] NFS: Refactor nfs_lookup_revalidate()

2019-08-02 Thread Greg Kroah-Hartman
From: Trond Myklebust commit 5ceb9d7fdaaf6d8ced6cd7861cf1deb9cd93fa47 upstream. Refactor the code in nfs_lookup_revalidate() as a stepping stone towards optimising and fixing nfs4_lookup_revalidate(). Signed-off-by: Trond Myklebust Signed-off-by: Qian Lu Signed-off-by: Greg Kroah-Hartman

[PATCH 4.19 00/32] 4.19.64-stable review

2019-08-02 Thread Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.19.64 release. There are 32 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know. Responses should be made by Sun 04 Aug 2019 09:19:34 AM UTC. Anything

[PATCH 4.19 23/32] vhost: scsi: add weight support

2019-08-02 Thread Greg Kroah-Hartman
From: Jason Wang commit c1ea02f15ab5efb3e93fc3144d895410bf79fcf2 upstream. This patch will check the weight and exit the loop if we exceeds the weight. This is useful for preventing scsi kthread from hogging cpu which is guest triggerable. This addresses CVE-2019-3900. Cc: Paolo Bonzini Cc:

[PATCH 4.19 27/32] /proc//cmdline: add back the setproctitle() special case

2019-08-02 Thread Greg Kroah-Hartman
From: Linus Torvalds commit d26d0cd97c88eb1a5704b42e41ab443406807810 upstream. This makes the setproctitle() special case very explicit indeed, and handles it with a separate helper function entirely. In the process, it re-instates the original semantics of simply stopping at the first NUL

[PATCH 4.19 31/32] block, scsi: Change the preempt-only flag into a counter

2019-08-02 Thread Greg Kroah-Hartman
From: Bart Van Assche commit cd84a62e0078dce09f4ed349bec84f86c9d54b30 upstream. The RQF_PREEMPT flag is used for three purposes: - In the SCSI core, for making sure that power management requests are executed even if a device is in the "quiesced" state. - For domain validation by SCSI drivers

[PATCH 4.19 05/32] NFSv4: Fix lookup revalidate of regular files

2019-08-02 Thread Greg Kroah-Hartman
From: Trond Myklebust commit c7944ebb9ce9461079659e9e6ec5baaf73724b3b upstream. If we're revalidating an existing dentry in order to open a file, we need to ensure that we check the directory has not changed before we optimise away the lookup. Signed-off-by: Trond Myklebust Signed-off-by:

[PATCH 5.2 11/20] xfrm: policy: fix bydst hlist corruption on hash rebuild

2019-08-02 Thread Greg Kroah-Hartman
From: Florian Westphal commit fd709721352dd5239056eacaded00f2244e6ef58 upstream. syzbot reported following spat: BUG: KASAN: use-after-free in __write_once_size include/linux/compiler.h:221 BUG: KASAN: use-after-free in hlist_del_rcu include/linux/rculist.h:455 BUG: KASAN: use-after-free in

[PATCH 5.2 06/20] ath10k: Change the warning message string

2019-08-02 Thread Greg Kroah-Hartman
From: Fabio Estevam commit 265df32eae5845212ad9f55f5ae6b6dcb68b187b upstream. The "WARNING" string confuses syzbot, which thinks it found a crash [1]. Change the string to avoid such problem. [1] https://lkml.org/lkml/2019/5/9/243 Reported-by:

[PATCH 5.2 03/20] ALSA: usb-audio: Sanity checks for each pipe and EP types

2019-08-02 Thread Greg Kroah-Hartman
From: Takashi Iwai commit 801ebf1043ae7b182588554cc9b9ad3c14bc2ab5 upstream. The recent USB core code performs sanity checks for the given pipe and EP types, and it can be hit by manipulated USB descriptors by syzbot. For making syzbot happier, this patch introduces a local helper for a sanity

[PATCH 5.2 16/20] /proc//cmdline: remove all the special cases

2019-08-02 Thread Greg Kroah-Hartman
From: Linus Torvalds commit 3d712546d8ba9f25cdf080d79f90482aa4231ed4 upstream. Start off with a clean slate that only reads exactly from arg_start to arg_end, without any oddities. This simplifies the code and in the process removes the case that caused us to potentially leak an uninitialized

[PATCH 5.2 02/20] ISDN: hfcsusb: checking idx of ep configuration

2019-08-02 Thread Greg Kroah-Hartman
From: Phong Tran commit f384e62a82ba5d85408405fdd6aeff89354deaa9 upstream. The syzbot test with random endpoint address which made the idx is overflow in the table of endpoint configuations. this adds the checking for fixing the error report from syzbot KASAN: stack-out-of-bounds Read in

[PATCH 5.2 07/20] media: cpia2_usb: first wake up, then free in disconnect

2019-08-02 Thread Greg Kroah-Hartman
From: Oliver Neukum commit eff73de2b1600ad8230692f00bc0ab49b166512a upstream. Kasan reported a use after free in cpia2_usb_disconnect() It first freed everything and then woke up those waiting. The reverse order is correct. Fixes: 6c493f8b28c67 ("[media] cpia2: major overhaul to get it in a

[PATCH 5.2 20/20] ceph: hold i_ceph_lock when removing caps for freeing inode

2019-08-02 Thread Greg Kroah-Hartman
From: Yan, Zheng commit d6e47819721ae2d9d090058ad5570a66f3c42e39 upstream. ceph_d_revalidate(, LOOKUP_RCU) may call __ceph_caps_issued_mask() on a freeing inode. Signed-off-by: "Yan, Zheng" Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov Signed-off-by: Greg Kroah-Hartman ---

[PATCH 5.2 04/20] bpf: fix NULL deref in btf_type_is_resolve_source_only

2019-08-02 Thread Greg Kroah-Hartman
From: Stanislav Fomichev commit e4f07120210a1794c1f1ae64d209a2fbc7bd2682 upstream. Commit 1dc92851849c ("bpf: kernel side support for BTF Var and DataSec") added invocations of btf_type_is_resolve_source_only before btf_type_nosize_or_null which checks for the NULL pointer. Swap the order of

[PATCH 5.2 08/20] media: pvrusb2: use a different format for warnings

2019-08-02 Thread Greg Kroah-Hartman
From: Andrey Konovalov commit 1753c7c4367aa1201e1e5d0a601897ab33444af1 upstream. When the pvrusb2 driver detects that there's something wrong with the device, it prints a warning message. Right now those message are printed in two different formats: 1. ***WARNING*** message here 2. WARNING:

[PATCH 5.2 05/20] media: au0828: fix null dereference in error path

2019-08-02 Thread Greg Kroah-Hartman
From: Sean Young commit 6d0d1ff9ff21fbb06b867c13a1d41ce8ddcd8230 upstream. au0828_usb_disconnect() gets the au0828_dev struct via usb_get_intfdata, so it needs to set up for the error paths. Reported-by: syzbot+357d86bcb4cca1a2f...@syzkaller.appspotmail.com Signed-off-by: Sean Young

[PATCH 5.2 09/20] NFS: Cleanup if nfs_match_client is interrupted

2019-08-02 Thread Greg Kroah-Hartman
From: Benjamin Coddington commit 9f7761cf0409465075dadb875d5d4b8ef2f890c8 upstream. Don't bail out before cleaning up a new allocation if the wait for searching for a matching nfs client is interrupted. Memory leaks. Reported-by: syzbot+7fe11b49c1cc30e3f...@syzkaller.appspotmail.com Fixes:

[PATCH 5.2 00/20] 5.2.6-stable review

2019-08-02 Thread Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.2.6 release. There are 20 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know. Responses should be made by Sun 04 Aug 2019 09:19:34 AM UTC. Anything

[PATCH 4.19 22/32] vhost: vsock: add weight support

2019-08-02 Thread Greg Kroah-Hartman
From: Jason Wang commit e79b431fb901ba1106670bcc80b9b617b25def7d upstream. This patch will check the weight and exit the loop if we exceeds the weight. This is useful for preventing vsock kthread from hogging cpu which is guest triggerable. The weight can help to avoid starving the request from

[PATCH 5.2 18/20] drivers/pps/pps.c: clear offset flags in PPS_SETPARAMS ioctl

2019-08-02 Thread Greg Kroah-Hartman
From: Miroslav Lichvar commit 5515e9a6273b8c02034466bcbd717ac9f53dab99 upstream. The PPS assert/clear offset corrections are set by the PPS_SETPARAMS ioctl in the pps_ktime structs, which also contain flags. The flags are not initialized by applications (using the timepps.h header) and they

[PATCH 5.2 19/20] Fix allyesconfig output.

2019-08-02 Thread Greg Kroah-Hartman
From: Yoshinori Sato commit 1b496469d0c020e09124e03e66a81421c21272a7 upstream. Conflict JCore-SoC and SolutionEngine 7619. Signed-off-by: Yoshinori Sato Signed-off-by: Greg Kroah-Hartman --- arch/sh/boards/Kconfig | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) ---

[PATCH 4.19 30/32] ceph: hold i_ceph_lock when removing caps for freeing inode

2019-08-02 Thread Greg Kroah-Hartman
From: Yan, Zheng commit d6e47819721ae2d9d090058ad5570a66f3c42e39 upstream. ceph_d_revalidate(, LOOKUP_RCU) may call __ceph_caps_issued_mask() on a freeing inode. Signed-off-by: "Yan, Zheng" Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov Signed-off-by: Greg Kroah-Hartman ---

[PATCH 5.2 01/20] vsock: correct removal of socket from the list

2019-08-02 Thread Greg Kroah-Hartman
From: Sunil Muthuswamy commit d5afa82c977ea06f7119058fa0eb8519ea501031 upstream. The current vsock code for removal of socket from the list is both subject to race and inefficient. It takes the lock, checks whether the socket is in the list, drops the lock and if the socket was on the list,

[PATCH 5.2 17/20] /proc//cmdline: add back the setproctitle() special case

2019-08-02 Thread Greg Kroah-Hartman
From: Linus Torvalds commit d26d0cd97c88eb1a5704b42e41ab443406807810 upstream. This makes the setproctitle() special case very explicit indeed, and handles it with a separate helper function entirely. In the process, it re-instates the original semantics of simply stopping at the first NUL

[PATCH 5.2 15/20] sched/fair: Use RCU accessors consistently for ->numa_group

2019-08-02 Thread Greg Kroah-Hartman
From: Jann Horn commit cb361d8cdef69990f6b4504dc1fd9a594d983c97 upstream. The old code used RCU annotations and accessors inconsistently for ->numa_group, which can lead to use-after-frees and NULL dereferences. Let all accesses to ->numa_group use proper RCU helpers to prevent such issues.

[PATCH 5.2 10/20] media: radio-raremono: change devm_k*alloc to k*alloc

2019-08-02 Thread Greg Kroah-Hartman
From: Luke Nowakowski-Krijger commit c666355e60ddb4748ead3bdd983e3f7f2224aaf0 upstream. Change devm_k*alloc to k*alloc to manually allocate memory The manual allocation and freeing of memory is necessary because when the USB radio is disconnected, the memory associated with devm_k*alloc is

[PATCH 5.2 14/20] sched/fair: Dont free p->numa_faults with concurrent readers

2019-08-02 Thread Greg Kroah-Hartman
From: Jann Horn commit 16d51a590a8ce3befb1308e0e7ab77f3b661af33 upstream. When going through execve(), zero out the NUMA fault statistics instead of freeing them. During execve, the task is reachable through procfs and the scheduler. A concurrent /proc/*/sched reader can read data from a freed

[PATCH 5.2 12/20] nvme: fix multipath crash when ANA is deactivated

2019-08-02 Thread Greg Kroah-Hartman
From: Marta Rybczynska commit 66b20ac0a1a10769d059d6903202f53494e3d902 upstream. Fix a crash with multipath activated. It happends when ANA log page is larger than MDTS and because of that ANA is disabled. The driver then tries to access unallocated buffer when connecting to a nvme target. The

[PATCH 4.19 28/32] drivers/pps/pps.c: clear offset flags in PPS_SETPARAMS ioctl

2019-08-02 Thread Greg Kroah-Hartman
From: Miroslav Lichvar commit 5515e9a6273b8c02034466bcbd717ac9f53dab99 upstream. The PPS assert/clear offset corrections are set by the PPS_SETPARAMS ioctl in the pps_ktime structs, which also contain flags. The flags are not initialized by applications (using the timepps.h header) and they

[PATCH 4.14 20/25] Bluetooth: hci_uart: check for missing tty operations

2019-08-02 Thread Greg Kroah-Hartman
From: Vladis Dronov commit b36a1552d7319bbfd5cf7f08726c23c5c66d4f73 upstream. Certain ttys operations (pty_unix98_ops) lack tiocmget() and tiocmset() functions which are called by the certain HCI UART protocols (hci_ath, hci_bcm, hci_intel, hci_mrvl, hci_qca) via hci_uart_set_flow_control() or

[PATCH 4.19 26/32] /proc//cmdline: remove all the special cases

2019-08-02 Thread Greg Kroah-Hartman
From: Linus Torvalds commit 3d712546d8ba9f25cdf080d79f90482aa4231ed4 upstream. Start off with a clean slate that only reads exactly from arg_start to arg_end, without any oddities. This simplifies the code and in the process removes the case that caused us to potentially leak an uninitialized

[PATCH 4.19 19/32] Bluetooth: hci_uart: check for missing tty operations

2019-08-02 Thread Greg Kroah-Hartman
From: Vladis Dronov commit b36a1552d7319bbfd5cf7f08726c23c5c66d4f73 upstream. Certain ttys operations (pty_unix98_ops) lack tiocmget() and tiocmset() functions which are called by the certain HCI UART protocols (hci_ath, hci_bcm, hci_intel, hci_mrvl, hci_qca) via hci_uart_set_flow_control() or

[PATCH 4.19 29/32] Fix allyesconfig output.

2019-08-02 Thread Greg Kroah-Hartman
From: Yoshinori Sato commit 1b496469d0c020e09124e03e66a81421c21272a7 upstream. Conflict JCore-SoC and SolutionEngine 7619. Signed-off-by: Yoshinori Sato Signed-off-by: Greg Kroah-Hartman --- arch/sh/boards/Kconfig | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) ---

[PATCH 4.19 20/32] vhost: introduce vhost_exceeds_weight()

2019-08-02 Thread Greg Kroah-Hartman
From: Jason Wang commit e82b9b0727ff6d665fff2d326162b460dded554d upstream. We used to have vhost_exceeds_weight() for vhost-net to: - prevent vhost kthread from hogging the cpu - balance the time spent between TX and RX This function could be useful for vsock and scsi as well. So move it to

[PATCH 4.19 17/32] iommu/vt-d: Dont queue_iova() if there is no flush queue

2019-08-02 Thread Greg Kroah-Hartman
From: Dmitry Safonov commit effa467870c7612012885df4e246bdb8ffd8e44c upstream. Intel VT-d driver was reworked to use common deferred flushing implementation. Previously there was one global per-cpu flush queue, afterwards - one per domain. Before deferring a flush, the queue should be

[PATCH 4.19 07/32] usb: dwc2: Fix disable all EPs on disconnect

2019-08-02 Thread Greg Kroah-Hartman
From: Minas Harutyunyan commit 4fe4f9fecc36956fd53c8edf96dd0c691ef98ff9 upstream. Disabling all EP's allow to reset EP's to initial state. Introduced new function dwc2_hsotg_ep_disable_lock() which before calling dwc2_hsotg_ep_disable() function acquire hsotg->lock and release on exiting. >From

[PATCH 4.19 32/32] scsi: core: Avoid that a kernel warning appears during system resume

2019-08-02 Thread Greg Kroah-Hartman
From: Bart Van Assche commit 17605afaae825b0291f80c62a7f6565879edaa8a upstream. Since scsi_device_quiesce() skips SCSI devices that have another state than RUNNING, OFFLINE or TRANSPORT_OFFLINE, scsi_device_resume() should not complain about SCSI devices that have been skipped. Hence this

[PATCH 4.19 25/32] sched/fair: Use RCU accessors consistently for ->numa_group

2019-08-02 Thread Greg Kroah-Hartman
From: Jann Horn commit cb361d8cdef69990f6b4504dc1fd9a594d983c97 upstream. The old code used RCU annotations and accessors inconsistently for ->numa_group, which can lead to use-after-frees and NULL dereferences. Let all accesses to ->numa_group use proper RCU helpers to prevent such issues.

[PATCH 4.19 24/32] sched/fair: Dont free p->numa_faults with concurrent readers

2019-08-02 Thread Greg Kroah-Hartman
From: Jann Horn commit 16d51a590a8ce3befb1308e0e7ab77f3b661af33 upstream. When going through execve(), zero out the NUMA fault statistics instead of freeing them. During execve, the task is reachable through procfs and the scheduler. A concurrent /proc/*/sched reader can read data from a freed

[PATCH 4.9 220/223] Bluetooth: hci_uart: check for missing tty operations

2019-08-02 Thread Greg Kroah-Hartman
From: Vladis Dronov commit b36a1552d7319bbfd5cf7f08726c23c5c66d4f73 upstream. Certain ttys operations (pty_unix98_ops) lack tiocmget() and tiocmset() functions which are called by the certain HCI UART protocols (hci_ath, hci_bcm, hci_intel, hci_mrvl, hci_qca) via hci_uart_set_flow_control() or

[PATCH 4.19 06/32] usb: dwc2: Disable all EPs on disconnect

2019-08-02 Thread Greg Kroah-Hartman
From: Minas Harutyunyan commit dccf1bad4be7eaa096c1f3697bd37883f9a08ecb upstream. Disabling all EP's allow to reset EP's to initial state. On disconnect disable all EP's instead of just killing all requests. Because of some platform didn't catch disconnect event, same stuff added to

[PATCH 4.19 09/32] binder: fix possible UAF when freeing buffer

2019-08-02 Thread Greg Kroah-Hartman
From: Todd Kjos commit a370003cc301d4361bae20c9ef615f89bf8d1e8a upstream. There is a race between the binder driver cleaning up a completed transaction via binder_free_transaction() and a user calling binder_ioctl(BC_FREE_BUFFER) to release a buffer. It doesn't matter which is first but they

[PATCH 4.19 08/32] arm64: compat: Provide definition for COMPAT_SIGMINSTKSZ

2019-08-02 Thread Greg Kroah-Hartman
From: Will Deacon commit 24951465cbd279f60b1fdc2421b3694405bcff42 upstream. arch/arm/ defines a SIGMINSTKSZ of 2k, so we should use the same value for compat tasks. Cc: Arnd Bergmann Cc: Dominik Brodowski Cc: "Eric W. Biederman" Cc: Andrew Morton Cc: Al Viro Cc: Oleg Nesterov

[PATCH 4.19 13/32] media: cpia2_usb: first wake up, then free in disconnect

2019-08-02 Thread Greg Kroah-Hartman
From: Oliver Neukum commit eff73de2b1600ad8230692f00bc0ab49b166512a upstream. Kasan reported a use after free in cpia2_usb_disconnect() It first freed everything and then woke up those waiting. The reverse order is correct. Fixes: 6c493f8b28c67 ("[media] cpia2: major overhaul to get it in a

[PATCH 4.19 16/32] media: radio-raremono: change devm_k*alloc to k*alloc

2019-08-02 Thread Greg Kroah-Hartman
From: Luke Nowakowski-Krijger commit c666355e60ddb4748ead3bdd983e3f7f2224aaf0 upstream. Change devm_k*alloc to k*alloc to manually allocate memory The manual allocation and freeing of memory is necessary because when the USB radio is disconnected, the memory associated with devm_k*alloc is

[PATCH 4.19 18/32] iommu/iova: Fix compilation error with !CONFIG_IOMMU_IOVA

2019-08-02 Thread Greg Kroah-Hartman
From: Joerg Roedel commit 201c1db90cd643282185a00770f12f95da330eca upstream. The stub function for !CONFIG_IOMMU_IOVA needs to be 'static inline'. Fixes: effa467870c76 ('iommu/vt-d: Don't queue_iova() if there is no flush queue') Signed-off-by: Joerg Roedel Signed-off-by: Dmitry Safonov

[PATCH 4.14 09/25] binder: fix possible UAF when freeing buffer

2019-08-02 Thread Greg Kroah-Hartman
From: Todd Kjos commit a370003cc301d4361bae20c9ef615f89bf8d1e8a upstream. There is a race between the binder driver cleaning up a completed transaction via binder_free_transaction() and a user calling binder_ioctl(BC_FREE_BUFFER) to release a buffer. It doesn't matter which is first but they

[PATCH 4.19 10/32] ISDN: hfcsusb: checking idx of ep configuration

2019-08-02 Thread Greg Kroah-Hartman
From: Phong Tran commit f384e62a82ba5d85408405fdd6aeff89354deaa9 upstream. The syzbot test with random endpoint address which made the idx is overflow in the table of endpoint configuations. this adds the checking for fixing the error report from syzbot KASAN: stack-out-of-bounds Read in

[PATCH 4.19 14/32] media: pvrusb2: use a different format for warnings

2019-08-02 Thread Greg Kroah-Hartman
From: Andrey Konovalov commit 1753c7c4367aa1201e1e5d0a601897ab33444af1 upstream. When the pvrusb2 driver detects that there's something wrong with the device, it prints a warning message. Right now those message are printed in two different formats: 1. ***WARNING*** message here 2. WARNING:

[PATCH 4.14 07/25] i2c: qup: fixed releasing dma without flush operation completion

2019-08-02 Thread Greg Kroah-Hartman
From: Abhishek Sahu commit 7239872fb3400b21a8f5547257f9f86455867bd6 upstream. The QUP BSLP BAM generates the following error sometimes if the current I2C DMA transfer fails and the flush operation has been scheduled “bam-dma-engine 7884000.dma: Cannot free busy channel” If any I2C error

[PATCH 4.19 12/32] ath10k: Change the warning message string

2019-08-02 Thread Greg Kroah-Hartman
From: Fabio Estevam commit 265df32eae5845212ad9f55f5ae6b6dcb68b187b upstream. The "WARNING" string confuses syzbot, which thinks it found a crash [1]. Change the string to avoid such problem. [1] https://lkml.org/lkml/2019/5/9/243 Reported-by:

[PATCH 4.14 24/25] ceph: hold i_ceph_lock when removing caps for freeing inode

2019-08-02 Thread Greg Kroah-Hartman
From: Yan, Zheng commit d6e47819721ae2d9d090058ad5570a66f3c42e39 upstream. ceph_d_revalidate(, LOOKUP_RCU) may call __ceph_caps_issued_mask() on a freeing inode. Signed-off-by: "Yan, Zheng" Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov Signed-off-by: Greg Kroah-Hartman ---

[PATCH 4.19 11/32] media: au0828: fix null dereference in error path

2019-08-02 Thread Greg Kroah-Hartman
From: Sean Young commit 6d0d1ff9ff21fbb06b867c13a1d41ce8ddcd8230 upstream. au0828_usb_disconnect() gets the au0828_dev struct via usb_get_intfdata, so it needs to set up for the error paths. Reported-by: syzbot+357d86bcb4cca1a2f...@syzkaller.appspotmail.com Signed-off-by: Sean Young

[PATCH 4.14 00/25] 4.14.136-stable review

2019-08-02 Thread Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.14.136 release. There are 25 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know. Responses should be made by Sun 04 Aug 2019 09:19:34 AM UTC. Anything

[PATCH 4.14 05/25] NFSv4: Fix lookup revalidate of regular files

2019-08-02 Thread Greg Kroah-Hartman
From: Trond Myklebust commit c7944ebb9ce9461079659e9e6ec5baaf73724b3b upstream. If we're revalidating an existing dentry in order to open a file, we need to ensure that we check the directory has not changed before we optimise away the lookup. Signed-off-by: Trond Myklebust Signed-off-by:

[PATCH 4.14 06/25] arm64: dts: marvell: Fix A37xx UART0 register size

2019-08-02 Thread Greg Kroah-Hartman
From: allen yan commit c737abc193d16e62e23e2fb585b8b7398ab380d8 upstream. Armada-37xx UART0 registers are 0x200 bytes wide. Right next to them are the UART1 registers that should not be declared in this node. Update the example in DT bindings document accordingly. Signed-off-by: allen yan

[PATCH 4.9 218/223] media: cpia2_usb: first wake up, then free in disconnect

2019-08-02 Thread Greg Kroah-Hartman
From: Oliver Neukum commit eff73de2b1600ad8230692f00bc0ab49b166512a upstream. Kasan reported a use after free in cpia2_usb_disconnect() It first freed everything and then woke up those waiting. The reverse order is correct. Fixes: 6c493f8b28c67 ("[media] cpia2: major overhaul to get it in a

[PATCH 4.14 04/25] NFS: Refactor nfs_lookup_revalidate()

2019-08-02 Thread Greg Kroah-Hartman
From: Trond Myklebust commit 5ceb9d7fdaaf6d8ced6cd7861cf1deb9cd93fa47 upstream. Refactor the code in nfs_lookup_revalidate() as a stepping stone towards optimising and fixing nfs4_lookup_revalidate(). Signed-off-by: Trond Myklebust Signed-off-by: Qian Lu Signed-off-by: Greg Kroah-Hartman

[PATCH 4.14 18/25] iommu/iova: Fix compilation error with !CONFIG_IOMMU_IOVA

2019-08-02 Thread Greg Kroah-Hartman
From: Joerg Roedel commit 201c1db90cd643282185a00770f12f95da330eca upstream. The stub function for !CONFIG_IOMMU_IOVA needs to be 'static inline'. Fixes: effa467870c76 ('iommu/vt-d: Don't queue_iova() if there is no flush queue') Signed-off-by: Joerg Roedel Signed-off-by: Dmitry Safonov

[PATCH 4.14 23/25] Fix allyesconfig output.

2019-08-02 Thread Greg Kroah-Hartman
From: Yoshinori Sato commit 1b496469d0c020e09124e03e66a81421c21272a7 upstream. Conflict JCore-SoC and SolutionEngine 7619. Signed-off-by: Yoshinori Sato Signed-off-by: Greg Kroah-Hartman --- arch/sh/boards/Kconfig | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) ---

[PATCH 4.9 215/223] arm64: compat: Provide definition for COMPAT_SIGMINSTKSZ

2019-08-02 Thread Greg Kroah-Hartman
From: Will Deacon commit 24951465cbd279f60b1fdc2421b3694405bcff42 upstream. arch/arm/ defines a SIGMINSTKSZ of 2k, so we should use the same value for compat tasks. Cc: Arnd Bergmann Cc: Dominik Brodowski Cc: "Eric W. Biederman" Cc: Andrew Morton Cc: Al Viro Cc: Oleg Nesterov

[PATCH 4.14 03/25] NFS: Fix dentry revalidation on NFSv4 lookup

2019-08-02 Thread Greg Kroah-Hartman
From: Trond Myklebust commit be189f7e7f03de35887e5a85ddcf39b91b5d7fc1 upstream. We need to ensure that inode and dentry revalidation occurs correctly on reopen of a file that is already open. Currently, we can end up not revalidating either in the case of NFSv4.0, due to the 'cached open' path.

[PATCH 4.14 14/25] media: pvrusb2: use a different format for warnings

2019-08-02 Thread Greg Kroah-Hartman
From: Andrey Konovalov commit 1753c7c4367aa1201e1e5d0a601897ab33444af1 upstream. When the pvrusb2 driver detects that there's something wrong with the device, it prints a warning message. Right now those message are printed in two different formats: 1. ***WARNING*** message here 2. WARNING:

[PATCH 4.14 15/25] NFS: Cleanup if nfs_match_client is interrupted

2019-08-02 Thread Greg Kroah-Hartman
From: Benjamin Coddington commit 9f7761cf0409465075dadb875d5d4b8ef2f890c8 upstream. Don't bail out before cleaning up a new allocation if the wait for searching for a matching nfs client is interrupted. Memory leaks. Reported-by: syzbot+7fe11b49c1cc30e3f...@syzkaller.appspotmail.com Fixes:

[PATCH 4.14 19/25] hv_sock: Add support for delayed close

2019-08-02 Thread Greg Kroah-Hartman
From: Sunil Muthuswamy commit a9eeb998c28d5506616426bd3a216bd5735a18b8 upstream. Currently, hvsock does not implement any delayed or background close logic. Whenever the hvsock socket is closed, a FIN is sent to the peer, and the last reference to the socket is dropped, which leads to a call to

[PATCH 4.14 16/25] media: radio-raremono: change devm_k*alloc to k*alloc

2019-08-02 Thread Greg Kroah-Hartman
From: Luke Nowakowski-Krijger commit c666355e60ddb4748ead3bdd983e3f7f2224aaf0 upstream. Change devm_k*alloc to k*alloc to manually allocate memory The manual allocation and freeing of memory is necessary because when the USB radio is disconnected, the memory associated with devm_k*alloc is

[PATCH 4.14 21/25] sched/fair: Dont free p->numa_faults with concurrent readers

2019-08-02 Thread Greg Kroah-Hartman
From: Jann Horn commit 16d51a590a8ce3befb1308e0e7ab77f3b661af33 upstream. When going through execve(), zero out the NUMA fault statistics instead of freeing them. During execve, the task is reachable through procfs and the scheduler. A concurrent /proc/*/sched reader can read data from a freed

[PATCH 4.14 02/25] vsock: correct removal of socket from the list

2019-08-02 Thread Greg Kroah-Hartman
From: Sunil Muthuswamy commit d5afa82c977ea06f7119058fa0eb8519ea501031 upstream. The current vsock code for removal of socket from the list is both subject to race and inefficient. It takes the lock, checks whether the socket is in the list, drops the lock and if the socket was on the list,

[PATCH 4.14 17/25] iommu/vt-d: Dont queue_iova() if there is no flush queue

2019-08-02 Thread Greg Kroah-Hartman
From: Dmitry Safonov commit effa467870c7612012885df4e246bdb8ffd8e44c upstream. Intel VT-d driver was reworked to use common deferred flushing implementation. Previously there was one global per-cpu flush queue, afterwards - one per domain. Before deferring a flush, the queue should be

[PATCH 4.14 22/25] drivers/pps/pps.c: clear offset flags in PPS_SETPARAMS ioctl

2019-08-02 Thread Greg Kroah-Hartman
From: Miroslav Lichvar commit 5515e9a6273b8c02034466bcbd717ac9f53dab99 upstream. The PPS assert/clear offset corrections are set by the PPS_SETPARAMS ioctl in the pps_ktime structs, which also contain flags. The flags are not initialized by applications (using the timepps.h header) and they

[PATCH 4.14 13/25] media: cpia2_usb: first wake up, then free in disconnect

2019-08-02 Thread Greg Kroah-Hartman
From: Oliver Neukum commit eff73de2b1600ad8230692f00bc0ab49b166512a upstream. Kasan reported a use after free in cpia2_usb_disconnect() It first freed everything and then woke up those waiting. The reverse order is correct. Fixes: 6c493f8b28c67 ("[media] cpia2: major overhaul to get it in a

[PATCH 4.14 01/25] VSOCK: use TCP state constants for sk_state

2019-08-02 Thread Greg Kroah-Hartman
From: Stefan Hajnoczi commit 3b4477d2dcf2709d0be89e2a8dced3d0f4a017f2 upstream. There are two state fields: socket->state and sock->sk_state. The socket->state field uses SS_UNCONNECTED, SS_CONNECTED, etc while the sock->sk_state typically uses values that match TCP state constants (TCP_CLOSE,

[PATCH 4.14 10/25] ISDN: hfcsusb: checking idx of ep configuration

2019-08-02 Thread Greg Kroah-Hartman
From: Phong Tran commit f384e62a82ba5d85408405fdd6aeff89354deaa9 upstream. The syzbot test with random endpoint address which made the idx is overflow in the table of endpoint configuations. this adds the checking for fixing the error report from syzbot KASAN: stack-out-of-bounds Read in

[PATCH 4.9 219/223] media: radio-raremono: change devm_k*alloc to k*alloc

2019-08-02 Thread Greg Kroah-Hartman
From: Luke Nowakowski-Krijger commit c666355e60ddb4748ead3bdd983e3f7f2224aaf0 upstream. Change devm_k*alloc to k*alloc to manually allocate memory The manual allocation and freeing of memory is necessary because when the USB radio is disconnected, the memory associated with devm_k*alloc is

[PATCH 4.9 217/223] media: au0828: fix null dereference in error path

2019-08-02 Thread Greg Kroah-Hartman
From: Sean Young commit 6d0d1ff9ff21fbb06b867c13a1d41ce8ddcd8230 upstream. au0828_usb_disconnect() gets the au0828_dev struct via usb_get_intfdata, so it needs to set up for the error paths. Reported-by: syzbot+357d86bcb4cca1a2f...@syzkaller.appspotmail.com Signed-off-by: Sean Young

[PATCH 4.14 11/25] media: au0828: fix null dereference in error path

2019-08-02 Thread Greg Kroah-Hartman
From: Sean Young commit 6d0d1ff9ff21fbb06b867c13a1d41ce8ddcd8230 upstream. au0828_usb_disconnect() gets the au0828_dev struct via usb_get_intfdata, so it needs to set up for the error paths. Reported-by: syzbot+357d86bcb4cca1a2f...@syzkaller.appspotmail.com Signed-off-by: Sean Young

[PATCH 4.9 210/223] access: avoid the RCU grace period for the temporary subjective credentials

2019-08-02 Thread Greg Kroah-Hartman
From: Linus Torvalds commit d7852fbd0f0423937fa287a598bfde188bb68c22 upstream. It turns out that 'access()' (and 'faccessat()') can cause a lot of RCU work because it installs a temporary credential that gets allocated and freed for each system call. The allocation and freeing overhead is

[PATCH 4.14 12/25] ath10k: Change the warning message string

2019-08-02 Thread Greg Kroah-Hartman
From: Fabio Estevam commit 265df32eae5845212ad9f55f5ae6b6dcb68b187b upstream. The "WARNING" string confuses syzbot, which thinks it found a crash [1]. Change the string to avoid such problem. [1] https://lkml.org/lkml/2019/5/9/243 Reported-by:

[PATCH 4.9 212/223] tcp: reset sk_send_head in tcp_write_queue_purge

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit dbbf2d1e4077bab0c65ece2765d3fc69cf7d610f ] tcp_write_queue_purge clears all the SKBs in the write queue but does not reset the sk_send_head. As a result, we can have a NULL pointer dereference anywhere that we use tcp_send_head instead of the tcp_write_queue_tail. For example,

<    4   5   6   7   8   9   10   11   12   13   >