[PATCH 03/24] tty: serial: fsl_lpuart: Flush HW FIFOs in .flush_buffer

2019-07-29 Thread Andrey Smirnov
Switching baud rate might cause bogus data to appear in HW FIFO. Add code to do a HW FIFO flush to .flush_buffer callback to avoid that. Signed-off-by: Fugang Duan Signed-off-by: Andrey Smirnov Cc: Stefan Agner Cc: Bhuvanchandra DV Cc: Chris Healy Cc: Cory Tusar Cc: Lucas Stach Cc: Greg Kro

[PATCH 12/24] tty: serial: fsl_lpuart: Clear CSTOPB unconditionally

2019-07-29 Thread Andrey Smirnov
Clearing CSTOPB bit if it is set is functionally equivalent to jsut clearing it unconditionally. Drop unnecessary check. Signed-off-by: Andrey Smirnov Cc: Stefan Agner Cc: Bhuvanchandra DV Cc: Chris Healy Cc: Cory Tusar Cc: Lucas Stach Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: linux-...@nx

[PATCH 11/24] tty: serial: fsl_lpuart: Drop unnecessary extra parenthesis

2019-07-29 Thread Andrey Smirnov
Drop unnecessary extra parenthesis in the driver. Signed-off-by: Andrey Smirnov Cc: Stefan Agner Cc: Bhuvanchandra DV Cc: Chris Healy Cc: Cory Tusar Cc: Lucas Stach Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: linux-...@nxp.com Cc: linux-ser...@vger.kernel.org Cc: linux-kernel@vger.kernel.org

[PATCH 04/24] tty: serial: fsl_lpuart: Simplify RX/TX IRQ handlers

2019-07-29 Thread Andrey Smirnov
It appears that lpuart_rxint, lpuart_txint and lpuart32_rxint were modelled after identical function found in UART driver for i.MX. However, while said functions are used as individual IRQ handlers in i.MX driver (in case of i.MX1), it is not the case for LPUART. Given that, there's no need for us

[PATCH 07/24] tty: serial: fsl_lpuart: Drop unnecessary uart_write_wakeup()

2019-07-29 Thread Andrey Smirnov
Uart_write_wakeup() will already be called as a part of lpuart*_transmit_buffer() call, so there doesn't seem to be a reason to call it again right after. It also appears that second uart_write_wakeup() might potentially cause unwanted write wakeup when transmitting an x_char. See commit 5e42e9a30

[PATCH 20/24] tty: serial: fsl_lpuart: Introduce lpuart_rx_dma_startup()

2019-07-29 Thread Andrey Smirnov
Code doing initial DMA RX configuration in lpuart_startup() and lpuart32_startup() is exactly the same, so move it into a standalone subroutine. Signed-off-by: Andrey Smirnov Cc: Stefan Agner Cc: Bhuvanchandra DV Cc: Chris Healy Cc: Cory Tusar Cc: Lucas Stach Cc: Greg Kroah-Hartman Cc: Jiri

[PATCH 16/24] tty: serial: fsl_lpuart: Introduce lpuart_stopped_or_empty()

2019-07-29 Thread Andrey Smirnov
The check for uart_circ_empty(xmit) || uart_tx_stopped(&sport->port) appears in multiple places in the driver. Move it into a helper function. Signed-off-by: Andrey Smirnov Cc: Stefan Agner Cc: Bhuvanchandra DV Cc: Chris Healy Cc: Cory Tusar Cc: Lucas Stach Cc: Greg Kroah-Hartman Cc:

[PATCH 19/24] tty: serial: fsl_lpuart: Introduce lpuart_tx_dma_startup()

2019-07-29 Thread Andrey Smirnov
Code configure DMA TX path in lpuart_startup(), lpuart32_startup() and lpuart_resume() is doing exactly the same thing, so move it into a standalone subroutine. Signed-off-by: Andrey Smirnov Cc: Stefan Agner Cc: Bhuvanchandra DV Cc: Chris Healy Cc: Cory Tusar Cc: Lucas Stach Cc: Greg Kroah-H

[PATCH 5.2 164/215] mm: use down_read_killable for locking mmap_sem in access_remote_vm

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 1e426fe28261b03f297992e89da3320b42816f4e ] This function is used by ptrace and proc files like /proc/pid/cmdline and /proc/pid/environ. Access_remote_vm never returns error codes, all errors are ignored and only size of successfully read data is returned. So, if current task wa

[PATCH 23/24] tty: serial: fsl_lpuart: Don't enable TIE in .startup() or .resume()

2019-07-29 Thread Andrey Smirnov
Enabling TIE in .startup() callback causes the driver to start (or at least try) to transmit data before .start_tx() is called. Which, while harmless (since TIE handler will immediately disable it), is a no-op and shouldn't really happen. Drop UARTCR2_TIE from list of bits set in lpuart_startup().

[PATCH 22/24] tty: serial: fsl_lpuart: Introduce lpuart*_setup_watermark_enable()

2019-07-29 Thread Andrey Smirnov
Most users of lpuart*_setup_watermark() enable identical set of flags right after the call, so combine those two action into a subroutine and make use of it. Signed-off-by: Andrey Smirnov Cc: Stefan Agner Cc: Bhuvanchandra DV Cc: Chris Healy Cc: Cory Tusar Cc: Lucas Stach Cc: Greg Kroah-Hart

[PATCH 5.2 165/215] mm, swap: fix race between swapoff and some swap operations

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit eb085574a7526c4375965c5fbf7e5b0c19cdd336 ] When swapin is performed, after getting the swap entry information from the page table, system will swap in the swap entry, without any lock held to prevent the swap device from being swapoff. This may cause the race like below, CPU 1

[PATCH 5.2 119/215] perf test mmap-thread-lookup: Initialize variable to suppress memory sanitizer warning

2019-07-29 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 05/24] tty: serial: fsl_lpuart: Fix bogus indentation

2019-07-29 Thread Andrey Smirnov
Fix bogus indentation in rx_dma_timer_init(). Signed-off-by: Andrey Smirnov Cc: Stefan Agner Cc: Bhuvanchandra DV Cc: Chris Healy Cc: Cory Tusar Cc: Lucas Stach Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: linux-...@nxp.com Cc: linux-ser...@vger.kernel.org Cc: linux-kernel@vger.kernel.org ---

[PATCH 09/24] tty: serial: fls_lpuart: Split shared TX IRQ handler into two

2019-07-29 Thread Andrey Smirnov
While sharing code for Tx interrupt handler between 8 and 32 bit variant of the peripheral saves a bit of code duplication it also adds quite a number of lpuart_is_32() checks which makes it harder to understand. Move shared bits back into corresponding lpuart*_transmit_buffer functions, split lpua

[PATCH 06/24] tty: serial: fsl_lpuart: Drop unnecessary sg_set_buf() call

2019-07-29 Thread Andrey Smirnov
Sg_init_one() will already call sg_set_buf(), so another explicit call right after it is unnecessary. Drop it. Signed-off-by: Andrey Smirnov Cc: Stefan Agner Cc: Bhuvanchandra DV Cc: Chris Healy Cc: Cory Tusar Cc: Lucas Stach Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: linux-...@nxp.com Cc:

[PATCH 21/24] tty: serial: fsl_lpuart: Introduce lpuart32_configure()

2019-07-29 Thread Andrey Smirnov
Code doing final steps of TX/RX configuration in lpuart32_startup() and lpuart_resume() is identical, so move it into a standalone subroutine. Signed-off-by: Andrey Smirnov Cc: Stefan Agner Cc: Bhuvanchandra DV Cc: Chris Healy Cc: Cory Tusar Cc: Lucas Stach Cc: Greg Kroah-Hartman Cc: Jiri S

[PATCH 5.2 155/215] memcg, fsnotify: no oom-kill for remote memcg charging

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit ec165450968b26298bd1c373de37b0ab6d826b33 ] Commit d46eb14b735b ("fs: fsnotify: account fsnotify metadata to kmemcg") added remote memcg charging for fanotify and inotify event objects. The aim was to charge the memory to the listener who is interested in the events but without t

[PATCH 5.2 172/215] Revert "usb: usb251xb: Add US port lanes inversion property"

2019-07-29 Thread Greg Kroah-Hartman
From: Lucas Stach commit 79f6fafad4e2a874015cb67d735f9f87f1834367 upstream. This property isn't needed and not yet used anywhere. The swap-dx-lanes property is perfectly fine for doing the swap on the upstream port lanes. CC: sta...@vger.kernel.org #5.2 Signed-off-by: Lucas Stach Link: https:/

[PATCH 17/24] tty: serial: fsl_lpuart: Drop unnecessary lpuart*_stop_tx()

2019-07-29 Thread Andrey Smirnov
By the time lpuart_shutdown() calls lpuart_stop_tx() UARTCR2_TE and UARTCR2_TIE (which the latter will clear) are already cleared, so that function call should effectively be a no-op. Moreso, lpuart_stop_tx() is expected to be executed with port spinlock held, which the caller doesn't. Given all th

[PATCH 5.2 168/215] usb-storage: Add a limitation for blk_queue_max_hw_sectors()

2019-07-29 Thread Greg Kroah-Hartman
From: Yoshihiro Shimoda commit d74ffae8b8dd17eaa8b82fc163e6aa2076dc8fb1 upstream. This patch fixes an issue that the following error happens on swiotlb environment: xhci-hcd ee00.usb: swiotlb buffer is full (sz: 524288 bytes), total 32768 (slots), used 1338 (slots) On the kernel v

[PATCH 5.2 174/215] KVM: X86: Fix fpu state crash in kvm guest

2019-07-29 Thread Greg Kroah-Hartman
From: Wanpeng Li commit e751732486eb3f159089a64d1901992b1357e7cc upstream. The idea before commit 240c35a37 (which has just been reverted) was that we have the following FPU states: userspace (QEMU) guest ---

[PATCH 5.2 177/215] KVM: PPC: Book3S HV: XIVE: fix rollback when kvmppc_xive_create fails

2019-07-29 Thread Greg Kroah-Hartman
From: Cédric Le Goater commit 9798f4ea71eaf8eaad7e688c5b298528089c7bf8 upstream. The XIVE device structure is now allocated in kvmppc_xive_get_device() and kfree'd in kvmppc_core_destroy_vm(). In case of an OPAL error when allocating the XIVE VPs, the kfree() call in kvmppc_xive_*create() will r

Re: [PATCH 1/1] psi: do not require setsched permission from the trigger creator

2019-07-29 Thread Greg KH
On Mon, Jul 29, 2019 at 12:42:05PM -0700, Suren Baghdasaryan wrote: > When a process creates a new trigger by writing into /proc/pressure/* > files, permissions to write such a file should be used to determine whether > the process is allowed to do so or not. Current implementation would also > req

[PATCH 5.2 166/215] locking/lockdep: Hide unused class variable

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 68037aa78208f34bda4e5cd76c357f718b838cbb ] The usage is now hidden in an #ifdef, so we need to move the variable itself in there as well to avoid this warning: kernel/locking/lockdep_proc.c:203:21: error: unused variable 'class' [-Werror,-Wunused-variable] Signed-off-by: Arn

[PATCH 5.2 201/215] io_uring: fix the sequence comparison in io_sequence_defer

2019-07-29 Thread Greg Kroah-Hartman
From: Zhengyuan Liu commit dbd0f6d6c2a11eb9c31ca9cd454f95bb5713e92e upstream. sq->cached_sq_head and cq->cached_cq_tail are both unsigned int. If cached_sq_head overflows before cached_cq_tail, then we may miss a barrier req. As cached_cq_tail always follows cached_sq_head, the NQ should be enou

[PATCH 5.2 169/215] usb: wusbcore: fix unbalanced get/put cluster_id

2019-07-29 Thread Greg Kroah-Hartman
From: Phong Tran commit f90bf1ece48a736097ea224430578fe586a9544c upstream. syzboot reported that https://syzkaller.appspot.com/bug?extid=fd2bd7df88c606eea4ef There is not consitency parameter in cluste_id_get/put calling. In case of getting the id with result is failure, the wusbhc->cluster_id

[PATCH 5.2 167/215] xhci: Fix crash if scatter gather is used with Immediate Data Transfer (IDT).

2019-07-29 Thread Greg Kroah-Hartman
From: Mathias Nyman commit d39b5bad8658d6d94cb2d98a44a7e159db4f5030 upstream. A second regression was found in the immediate data transfer (IDT) support which was added to 5.2 kernel IDT is used to transfer small amounts of data (up to 8 bytes) in the field normally used for data dma address, t

[PATCH 5.2 170/215] usb: pci-quirks: Correct AMD PLL quirk detection

2019-07-29 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 in

[PATCH 4.14 016/293] media: vpss: fix a potential NULL pointer dereference

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit e08f0761234def47961d3252eac09ccedfe4c6a0 ] In case ioremap fails, the fix returns -ENOMEM to avoid NULL pointer dereference. Signed-off-by: Kangjie Lu Acked-by: Lad, Prabhakar Reviewed-by: Mukesh Ojha Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- driv

[PATCH 5.2 184/215] binder: Set end of SG buffer area properly.

2019-07-29 Thread Greg Kroah-Hartman
From: Martijn Coenen commit a56587065094fd96eb4c2b5ad65571daad32156d upstream. In case the target node requests a security context, the extra_buffers_size is increased with the size of the security context. But, that size is not available for use by regular scatter-gather buffers; make sure the

[PATCH 5.2 195/215] ALSA: hda - Add a conexant codec entry to let mute led work

2019-07-29 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. A

Re: [alsa-devel] [PATCH v2 1/7] ASoC: fsl_sai: Add registers definition for multiple datalines

2019-07-29 Thread Daniel Baluta
On Mon, Jul 29, 2019 at 10:42 PM Nicolin Chen wrote: > > On Sun, Jul 28, 2019 at 10:24:23PM +0300, Daniel Baluta wrote: > > SAI IP supports up to 8 data lines. The configuration of > > supported number of data lines is decided at SoC integration > > time. > > > > This patch adds definitions for al

[PATCH 5.2 171/215] Revert "usb: usb251xb: Add US lanes inversion dts-bindings"

2019-07-29 Thread Greg Kroah-Hartman
From: Lucas Stach commit bafe64e5f0edaa689e72e2f8dc236641da37fed4 upstream. This reverts commit 3342ce35a1, as there is no need for this separate property and it breaks compatibility with existing devicetree files (arch/arm64/boot/dts/freescale/imx8mq.dtsi). CC: sta...@vger.kernel.org #5.2 Fixe

[PATCH 5.2 213/215] io_uring: ensure ->list is initialized for poll commands

2019-07-29 Thread Greg Kroah-Hartman
From: Jens Axboe commit 36703247d5f52a679df9da51192b6950fe81689f upstream. Daniel reports that when testing an http server that uses io_uring to poll for incoming connections, sometimes it hard crashes. This is due to an uninitialized list member for the io_uring request. Normally this doesn't t

[PATCH 5.2 196/215] powerpc/dma: Fix invalid DMA mmap behavior

2019-07-29 Thread Greg Kroah-Hartman
From: Shawn Anastasio commit b4fc36e60f25cf22bf8b7b015a701015740c3743 upstream. The refactor of powerpc DMA functions in commit cc17d780 ("powerpc/dma: remove dma_nommu_mmap_coherent") incorrectly changes the way DMA mappings are handled on powerpc. Since this change, all mapped pages are ma

[PATCH 5.2 208/215] libnvdimm/bus: Stop holding nvdimm_bus_list_mutex over __nd_ioctl()

2019-07-29 Thread Greg Kroah-Hartman
From: Dan Williams commit b70d31d054ee3a6fc1034b9d7fc0ae1e481aa018 upstream. In preparation for fixing a deadlock between wait_for_bus_probe_idle() and the nvdimm_bus_list_mutex arrange for __nd_ioctl() without nvdimm_bus_list_mutex held. This also unifies the 'dimm' and 'bus' level ioctls into

[PATCH 5.2 182/215] x86/speculation/mds: Apply more accurate check on hypervisor platform

2019-07-29 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 runnin

[PATCH 5.2 185/215] binder: prevent transactions to context manager from its own process.

2019-07-29 Thread Greg Kroah-Hartman
From: Hridya Valsaraju commit 49ed96943a8e0c62cc5a9b0a6cfc88be87d1fcec upstream. Currently, a transaction to context manager from its own process is prevented by checking if its binder_proc struct is the same as that of the sender. However, this would not catch cases where the process opens the

[PATCH 5.2 214/215] io_uring: fix counter inc/dec mismatch in async_list

2019-07-29 Thread Greg Kroah-Hartman
From: Zhengyuan Liu commit f7b76ac9d17e16e44feebb6d2749fec92bfd6dd4 upstream. We could queue a work for each req in defer and link list without increasing async_list->cnt, so we shouldn't decrease it while exiting from workqueue as well if we didn't process the req in async list. Thanks to Jens

[PATCH 5.2 186/215] fpga-manager: altera-ps-spi: Fix build error

2019-07-29 Thread Greg Kroah-Hartman
From: YueHaibing commit 3d139703d397f6281368047ba7ad1c8bf95aa8ab upstream. If BITREVERSE is m and FPGA_MGR_ALTERA_PS_SPI is y, build fails: drivers/fpga/altera-ps-spi.o: In function `altera_ps_write': altera-ps-spi.c:(.text+0x4ec): undefined reference to `byte_rev_table' Select BITREVERSE to f

[PATCH 5.2 163/215] locking/lockdep: Fix lock used or unused stats error

2019-07-29 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 configura

[PATCH 5.2 205/215] drivers/base: Introduce kill_device()

2019-07-29 Thread Greg Kroah-Hartman
From: Dan Williams commit 00289cd87676e14913d2d8492d1ce05c4baafdae upstream. The libnvdimm subsystem arranges for devices to be destroyed as a result of a sysfs operation. Since device_unregister() cannot be called from an actively running sysfs attribute of the same device libnvdimm arranges fo

[PATCH 5.2 215/215] io_uring: dont use iov_iter_advance() for fixed buffers

2019-07-29 Thread Greg Kroah-Hartman
From: Jens Axboe commit bd11b3a391e3df6fa958facbe4b3f9f4cca9bd49 upstream. Hrvoje reports that when a large fixed buffer is registered and IO is being done to the latter pages of said buffer, the IO submission time is much worse: reading to the start of the buffer: 11238 ns reading to the end o

[PATCH 5.2 203/215] iommu/iova: Remove stale cached32_node

2019-07-29 Thread Greg Kroah-Hartman
From: Chris Wilson commit 9eed17d37c77171cf5ffb95c4257f87df3cd4c8f upstream. Since the cached32_node is allowed to be advanced above dma_32bit_pfn (to provide a shortcut into the limited range), we need to be careful to remove the to be freed node if it is the cached32_node. [ 48.43] BUG:

[PATCH 5.2 197/215] powerpc/xive: Fix loop exit-condition in xive_find_target_in_mask()

2019-07-29 Thread Greg Kroah-Hartman
From: Gautham R. Shenoy commit 4d202c8c8ed3822327285747db1765967110b274 upstream. xive_find_target_in_mask() has the following for(;;) loop which has a bug when @first == cpumask_first(@mask) and condition 1 fails to hold for every CPU in @mask. In this case we loop forever in the for-loop. f

[PATCH 5.2 206/215] libnvdimm/bus: Prevent duplicate device_unregister() calls

2019-07-29 Thread Greg Kroah-Hartman
From: Dan Williams commit 8aac0e2338916e273ccbd438a2b7a1e8c61749f5 upstream. A multithreaded namespace creation/destruction stress test currently fails with signatures like the following: sysfs group 'power' not found for kobject 'dax1.1' RIP: 0010:sysfs_remove_group+0x76/0x80 Call

[PATCH 5.2 204/215] iommu/iova: Fix compilation error with !CONFIG_IOMMU_IOVA

2019-07-29 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: Greg Kroah-Hartman

[PATCH 5.2 200/215] powerpc/pmu: Set pmcregs_in_use in paca when running as LPAR

2019-07-29 Thread Greg Kroah-Hartman
From: Suraj Jitindar Singh commit 28d2a6e6684d9851905f379816d8a4d03587ed94 upstream. The ability to run nested guests under KVM means that a guest can also act as a hypervisor for it's own nested guest. Currently ppc_set_pmu_inuse() assumes that either FW_FEATURE_LPAR is set, indicating a guest

[PATCH 5.2 202/215] iommu/vt-d: Dont queue_iova() if there is no flush queue

2019-07-29 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 allocated

[PATCH 5.2 210/215] drm/i915: Make the semaphore saturation mask global

2019-07-29 Thread Greg Kroah-Hartman
From: Chris Wilson commit 44d89409a12eb8333735958509d7d591b461d13d upstream. The idea behind keeping the saturation mask local to a context backfired spectacularly. The premise with the local mask was that we would be more proactive in attempting to use semaphores after each time the context idl

Re: BUG: KASAN: global-out-of-bounds in ata_exec_internal_sg+0x50f/0xc70

2019-07-29 Thread Jens Axboe
On 7/29/19 1:34 PM, Jeffrin Thalakkottoor wrote: > hello Kees Cook, > > i tested your fix and i think it worked like a charm ! > kasan message related disappeared during boot time and it does not > show in the output of "sudo dmesg -l err" > anyway thanks a lot ! Kees, could you send that out as

[PATCH 5.2 154/215] mm/gup.c: remove some BUG_ONs from get_gate_page()

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit b5d1c39f34d1c9bca0c4b9ae2e339fbbe264a9c7 ] If we end up without a PGD or PUD entry backing the gate area, don't BUG -- just fail gracefully. It's not entirely implausible that this could happen some day on x86. It doesn't right now even with an execute-only emulated vsyscall pa

[PATCH 5.2 209/215] structleak: disable STRUCTLEAK_BYREF in combination with KASAN_STACK

2019-07-29 Thread Greg Kroah-Hartman
From: Arnd Bergmann commit 173e6ee21e2b3f477f07548a79c43b8d9cfbb37d upstream. The combination of KASAN_STACK and GCC_PLUGIN_STRUCTLEAK_BYREF leads to much larger kernel stack usage, as seen from the warnings about functions that now exceed the 2048 byte limit: drivers/media/i2c/tvp5150.c:253:1:

[PATCH 5.2 199/215] powerpc/tm: Fix oops on sigreturn on systems without TM

2019-07-29 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 t

[PATCH 5.2 207/215] libnvdimm/region: Register badblocks before namespaces

2019-07-29 Thread Greg Kroah-Hartman
From: Dan Williams commit 700cd033a82d466ad8f9615f9985525e45f8960a upstream. Namespace activation expects to be able to reference region badblocks. The following warning sometimes triggers when asynchronous namespace activation races in front of the completion of namespace probing. Move all poss

[PATCH 5.2 198/215] powerpc/mm: Limit rma_size to 1TB when running without HV mode

2019-07-29 Thread Greg Kroah-Hartman
From: Suraj Jitindar Singh commit da0ef93310e67ae6902efded60b6724dab27a5d1 upstream. The virtual real mode addressing (VRMA) mechanism is used when a partition is using HPT (Hash Page Table) translation and performs real mode accesses (MSR[IR|DR] = 0) in non-hypervisor mode. In this mode effecti

[PATCH 5.2 211/215] access: avoid the RCU grace period for the temporary subjective credentials

2019-07-29 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 mostl

[PATCH 5.2 160/215] proc: use down_read_killable mmap_sem for /proc/pid/map_files

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit cd9e2bb8271c971d9f37c722be2616c7f8ba0664 ] Do not remain stuck forever if something goes wrong. Using a killable lock permits cleanup of stuck tasks and simplifies investigation. It seems ->d_revalidate() could return any error (except ECHILD) to abort validation and pass error

[PATCH 5.2 212/215] io_uring: add a memory barrier before atomic_read

2019-07-29 Thread Greg Kroah-Hartman
From: Zhengyuan Liu commit c0e48f9dea9129aa11bec3ed13803bcc26e96e49 upstream. There is a hang issue while using fio to do some basic test. The issue can be easily reproduced using the below script: while true do fio --ioengine=io_uring -rw=write -bs=4k -numjobs

[PATCH 5.2 161/215] cxgb4: reduce kernel stack usage in cudbg_collect_mem_region()

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 752c2ea2d8e7c23b0f64e2e7d4337f3604d44c9f ] The cudbg_collect_mem_region() and cudbg_read_fw_mem() both use several hundred kilobytes of kernel stack space. One gets inlined into the other, which causes the stack usage to be combined beyond the warning limit when building with cla

[PATCH 5.2 162/215] proc: use down_read_killable mmap_sem for /proc/pid/maps

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 8a713e7df3352b8d9392476e9cf29e4e185dac32 ] Do not remain stuck forever if something goes wrong. Using a killable lock permits cleanup of stuck tasks and simplifies investigation. This function is also used for /proc/pid/smaps. Link: http://lkml.kernel.org/r/156007493160.3335.1

[PATCH 5.2 159/215] proc: use down_read_killable mmap_sem for /proc/pid/clear_refs

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit c46038017fbdcac627b670c9d4176f1d0c2f5fa3 ] Do not remain stuck forever if something goes wrong. Using a killable lock permits cleanup of stuck tasks and simplifies investigation. Replace the only unkillable mmap_sem lock in clear_refs_write(). Link: http://lkml.kernel.org/r/15

[PATCH 5.2 194/215] ALSA: hda - Fix intermittent CORB/RIRB stall on Intel chips

2019-07-29 Thread Greg Kroah-Hartman
From: Takashi Iwai commit 2756d9143aa517b97961e85412882b8ce31371a6 upstream. It turned out that the recent Intel HD-audio controller chips show a significant stall during the system PM resume intermittently. It doesn't happen so often and usually it may read back successfully after one or more

[PATCH 5.2 158/215] proc: use down_read_killable mmap_sem for /proc/pid/pagemap

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit ad80b932c57d85fd6377f97f359b025baf179a87 ] Do not remain stuck forever if something goes wrong. Using a killable lock permits cleanup of stuck tasks and simplifies investigation. Link: http://lkml.kernel.org/r/156007493638.3335.4872164955523928492.stgit@buzz Signed-off-by: Kons

[PATCH 5.2 193/215] ALSA: pcm: Fix refcount_inc() on zero usage

2019-07-29 Thread Greg Kroah-Hartman
From: Takashi Iwai commit 0e279dcea0ec897af1c979ebee4ec92b461793f5 upstream. The recent rewrite of PCM link lock management introduced the refcount in snd_pcm_group object, managed by the kernel refcount_t API. This caused unexpected kernel warnings when the kernel is built with CONFIG_REFCOUNT

[PATCH 5.2 192/215] ALSA: line6: Fix wrong altsetting for LINE6_PODHD500_1

2019-07-29 Thread Greg Kroah-Hartman
From: Kai-Heng Feng commit 70256b42caaf3e13c2932c2be7903a73fbe8bb8b upstream. Commit 7b9584fa1c0b ("staging: line6: Move altsetting to properties") set a wrong altsetting for LINE6_PODHD500_1 during refactoring. Set the correct altsetting number to fix the issue. BugLink: https://bugs.launchpa

[PATCH 5.2 188/215] eeprom: make older eeprom drivers select NVMEM_SYSFS

2019-07-29 Thread Greg Kroah-Hartman
From: Arseny Solokha commit 1b5621832f9bd9899370ea6928462cd02ebe7dc0 upstream. misc/eeprom/{at24,at25,eeprom_93xx46} drivers all register their corresponding devices in the nvmem framework in compat mode which requires nvmem sysfs interface to be present. The latter, however, has been split out

[PATCH 5.2 191/215] ALSA: ac97: Fix double free of ac97_codec_device

2019-07-29 Thread Greg Kroah-Hartman
From: Ding Xiang commit 607975b30db41aad6edc846ed567191aa6b7d893 upstream. put_device will call ac97_codec_release to free ac97_codec_device and other resources, so remove the kfree and other redundant code. Fixes: 74426fbff66e ("ALSA: ac97: add an ac97 bus") Signed-off-by: Ding Xiang Cc: Sig

[PATCH 5.2 190/215] drm/panel: Add support for Armadeus ST0700 Adapt

2019-07-29 Thread Greg Kroah-Hartman
From: Sébastien Szymanski commit c479450f61c7f1f248c9a54aedacd2a6ca521ff8 upstream. This patch adds support for the Armadeus ST0700 Adapt. It comes with a Santek ST0700I5Y-RBSLW 7.0" WVGA (800x480) TFT and an adapter board so that it can be connected on the TFT header of Armadeus Dev boards. Cc

[PATCH 5.2 189/215] hpet: Fix division by zero in hpet_time_div()

2019-07-29 Thread Greg Kroah-Hartman
From: Kefeng Wang commit 0c7d37f4d9b8446956e97b7c5e61173cdb7c8522 upstream. The base value in do_div() called by hpet_time_div() is truncated from unsigned long to uint32_t, resulting in a divide-by-zero exception. UBSAN: Undefined behaviour in ../drivers/char/hpet.c:572:2 division by zero CPU:

[PATCH 5.2 187/215] mei: me: add mule creek canyon (EHL) device ids

2019-07-29 Thread Greg Kroah-Hartman
From: Alexander Usyskin commit 1be8624a0cbef720e8da39a15971e01abffc865b upstream. Add Mule Creek Canyon (PCH) MEI device ids for Elkhart Lake (EHL) Platform. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Cc: stable Link: https://lore.kernel.org/r/20190712095814.20746-1-tomas.

[PATCH 5.2 179/215] btrfs: inode: Dont compress if NODATASUM or NODATACOW set

2019-07-29 Thread Greg Kroah-Hartman
From: Qu Wenruo commit 42c16da6d684391db83788eb680accd84f6c2083 upstream. As btrfs(5) specified: Note If nodatacow or nodatasum are enabled, compression is disabled. If NODATASUM or NODATACOW set, we should not compress the extent. Normally NODATACOW is detected properly in ru

[PATCH 5.2 178/215] media: videodev2.h: change V4L2_PIX_FMT_BGRA444 define: fourcc was already in use

2019-07-29 Thread Greg Kroah-Hartman
From: Hans Verkuil commit 22be8233b34f4f468934c5fefcbe6151766fb8f2 upstream. The V4L2_PIX_FMT_BGRA444 define clashed with the pre-existing V4L2_PIX_FMT_SGRBG12 which strangely enough used the same fourcc, even though that fourcc made no sense for a Bayer format. In any case, you can't have dup

[PATCH 5.2 176/215] KVM: PPC: Book3S HV: Save and restore guest visible PSSCR bits on pseries

2019-07-29 Thread Greg Kroah-Hartman
From: Suraj Jitindar Singh commit c8b4083db915dfe5a3b4a755ad2317e0509b43f1 upstream. The Performance Stop Status and Control Register (PSSCR) is used to control the power saving facilities of the processor. This register has various fields, some of which can be modified only in hypervisor state,

[PATCH 5.2 181/215] x86/sysfb_efi: Add quirks for some devices with swapped width and height

2019-07-29 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 w

[PATCH 5.2 156/215] mm/mmu_notifier: use hlist_add_head_rcu()

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 543bdb2d825fe2400d6e951f1786d92139a16931 ] Make mmu_notifier_register() safer by issuing a memory barrier before registering a new notifier. This fixes a theoretical bug on weakly ordered CPUs. For example, take this simplified use of notifiers by a driver: my_struct->

[PATCH 5.2 157/215] proc: use down_read_killable mmap_sem for /proc/pid/smaps_rollup

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit a26a97815548574213fd37f29b4b78ccc6d9ed20 ] Do not remain stuck forever if something goes wrong. Using a killable lock permits cleanup of stuck tasks and simplifies investigation. Link: http://lkml.kernel.org/r/156007493429.3335.14666825072272692455.stgit@buzz Signed-off-by: Kon

[PATCH 5.2 175/215] KVM: PPC: Book3S HV: Always save guest pmu for guest capable of nesting

2019-07-29 Thread Greg Kroah-Hartman
From: Suraj Jitindar Singh commit 63279eeb7f93abb1692573c26f1e038e1a87358b upstream. The performance monitoring unit (PMU) registers are saved on guest exit when the guest has set the pmcregs_in_use flag in its lppaca, if it exists, or unconditionally if it doesn't. If a nested guest is being ru

[PATCH 5.2 173/215] usb: usb251xb: Reallow swap-dx-lanes to apply to the upstream port

2019-07-29 Thread Greg Kroah-Hartman
From: Lucas Stach commit 4849ee6129702dcb05d36f9c7c61b4661fcd751f upstream. This is a partial revert of 73d31def1aab "usb: usb251xb: Create a ports field collector method", which broke a existing devicetree (arch/arm64/boot/dts/freescale/imx8mq.dtsi). There is no reason why the swap-dx-lanes pr

[PATCH 5.2 180/215] selinux: check sidtab limit before adding a new entry

2019-07-29 Thread Greg Kroah-Hartman
From: Ondrej Mosnacek commit acbc372e6109c803cbee4733769d02008381740f upstream. We need to error out when trying to add an entry above SIDTAB_MAX in sidtab_reverse_lookup() to avoid overflow on the odd chance that this happens. Cc: sta...@vger.kernel.org Fixes: ee1a84fdfeed ("selinux: overhaul

[PATCH 5.2 183/215] x86/stacktrace: Prevent access_ok() warnings in arch_stack_walk_user()

2019-07-29 Thread Greg Kroah-Hartman
From: Eiichi Tsukata commit 2af7c85714d8cafadf925d55441458eae312cd6b upstream. When arch_stack_walk_user() is called from atomic contexts, access_ok() can trigger the following warning if compiled with CONFIG_DEBUG_ATOMIC_SLEEP=y. Reproducer: // CONFIG_DEBUG_ATOMIC_SLEEP=y # cd /sys/kernel

[PATCH 5.2 121/215] rseq/selftests: Fix Thumb mode build failure on arm32

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit ee8a84c60bcc1f1615bd9cb3edfe501e26cdc85b ] Using ".arm .inst" for the arm signature introduces build issues for programs compiled in Thumb mode because the assembler stays in the arm mode for the rest of the inline assembly. Revert to using a ".word" to express the signature as d

[PATCH 24/24] tty: serial: fsl_lpuart: Ignore TX/RX interrupts if DMA is enabled

2019-07-29 Thread Andrey Smirnov
In a mixed DMA/IRQ use-case (e.g.: DMA for TX, IRQ for RX), interrupt handler might try to handle Rx/Tx condition it shouldn't. Change the code to only handle TX/RX event if corresponding path isn't being handled by DMA. Signed-off-by: Andrey Smirnov Cc: Stefan Agner Cc: Bhuvanchandra DV Cc: Ch

[PATCH 02/24] tty: serial: fsl_lpuart: flush receive FIFO after overruns

2019-07-29 Thread Andrey Smirnov
From: Stefan Agner After overruns the FIFO pointers become misaligned. This typically shows by characters still being stuck in the FIFO despite the empty flag being asserted. After the first assertion of the overrun flag the empty flag still seems to indicate FIFO state correctly and all data can

[PATCH 5.2 123/215] perf trace: Fix potential NULL pointer dereference found by the smatch tool

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 7a6d49dc8cad8fa1f3d63994102af8f9ae9c859f ] Based on the following report from Smatch, fix the potential NULL pointer dereference check. tools/perf/builtin-trace.c:1044 thread_trace__new() error: we previously assumed 'ttrace' could be null (see line 1041). tools/perf/bu

[PATCH 14/24] tty: serial: fsl_lpuart: Introduce lpuart_wait_bit_set()

2019-07-29 Thread Andrey Smirnov
Busy polling on a bit in a register is used in multiple places in the driver. Move it into a shared function. Signed-off-by: Andrey Smirnov Cc: Stefan Agner Cc: Bhuvanchandra DV Cc: Chris Healy Cc: Cory Tusar Cc: Lucas Stach Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: linux-...@nxp.com Cc: l

[PATCH 18/24] tty: serial: fsl_lpuart: Introduce lpuart_dma_shutdown()

2019-07-29 Thread Andrey Smirnov
Last steps of .shutdown() code are identical for lpuart and lpuart32 cases, so move it all into a standalone subroutine. Signed-off-by: Andrey Smirnov Cc: Stefan Agner Cc: Bhuvanchandra DV Cc: Chris Healy Cc: Cory Tusar Cc: Lucas Stach Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: linux-...@nx

[PATCH 5.2 114/215] PCI: mobiveil: Fix PCI base address in MEM/IO outbound windows

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit f99536e9d2f55996038158a6559d4254a7cc1693 ] The outbound memory windows PCI base addresses should be taken from the 'ranges' property of DT node to setup MEM/IO outbound windows decoding correctly instead of being hardcoded to zero. Update the code to retrieve the PCI base addres

[PATCH 08/24] tty: serial: fsl_lpuart: Fix issue in software flow control

2019-07-29 Thread Andrey Smirnov
Although I haven't observed this bug in practice, it seems that the code for handling x_char of LPUART is pretty much identical to that of i.MX. So the fix found in commit 7e2fb5aa8d81 ("serial: imx: Fix issue in software flow control"): serial: imx: Fix issue in software flow control Aft

[PATCH 5.2 142/215] f2fs: avoid out-of-range memory access

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 56f3ce675103e3fb9e631cfb4131fc768bc23e9a ] blkoff_off might over 512 due to fs corrupt or security vulnerability. That should be checked before being using. Use ENTRIES_IN_SUM to protect invalid value in cur_data_blkoff. Signed-off-by: Ocean Chen Reviewed-by: Chao Yu Signed-o

[PATCH 5.2 149/215] sh: prevent warnings when using iounmap

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 733f0025f0fb43e382b84db0930ae502099b7e62 ] When building drm/exynos for sh, as part of an allmodconfig build, the following warning triggered: exynos7_drm_decon.c: In function `decon_remove': exynos7_drm_decon.c:769:24: warning: unused variable `ctx' struct decon_context

[PATCH 5.2 148/215] nvme: fix NULL deref for fabrics options

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 7d30c81b80ea9b0812d27030a46a5bf4c4e328f5 ] git://git.infradead.org/nvme.git nvme-5.3 branch now causes the following NULL deref oops. Check the ctrl->opts first before the deref. [ 16.337581] BUG: kernel NULL pointer dereference, address: 0056 [ 16.338551] #PF:

[PATCH 5.2 153/215] mm/gup.c: mark undo_dev_pagemap as __maybe_unused

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 790c73690c2bbecb3f6f8becbdb11ddc9bcff8cc ] Several mips builds generate the following build warning. mm/gup.c:1788:13: warning: 'undo_dev_pagemap' defined but not used The function is declared unconditionally but only called from behind various ifdefs. Mark it __maybe_unused.

[PATCH 5.2 144/215] dlm: check if workqueues are NULL before flushing/destroying

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit b355516f450703c9015316e429b66a93dfff0e6f ] If the DLM lowcomms stack is shut down before any DLM traffic can be generated, flush_workqueue() and destroy_workqueue() can be called on empty send and/or recv workqueues. Insert guard conditionals to only call flush_workqueue() and d

[PATCH 5.2 117/215] PCI: mobiveil: Initialize Primary/Secondary/Subordinate bus numbers

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 6f3ab451aa5c2cbff33197d82fe8489cbd55ad91 ] The reset value of Primary, Secondary and Subordinate bus numbers is zero which is a broken setup. Program a sensible default value for Primary/Secondary/Subordinate bus numbers. Signed-off-by: Hou Zhiqiang Signed-off-by: Lorenzo Pier

[PATCH 5.2 143/215] mailbox: handle failed named mailbox channel request

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 25777e5784a7b417967460d4fcf9660d05a0c320 ] Previously, if mbox_request_channel_byname was used with a name which did not exist in the "mbox-names" property of a mailbox client, the mailbox corresponding to the last entry in the "mbox-names" list would be incorrectly selected. Wit

[PATCH 5.2 145/215] powerpc/eeh: Handle hugepages in ioremap space

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 33439620680be5225c1b8806579a291e0d761ca0 ] In commit 4a7b06c157a2 ("powerpc/eeh: Handle hugepages in ioremap space") support for using hugepages in the vmalloc and ioremap areas was enabled for radix. Unfortunately this broke EEH MMIO error checking. Detection works by inserting

[PATCH 5.2 136/215] nvme-tcp: set the STABLE_WRITES flag when data digests are enabled

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 958f2a0f8121ae36a5cbff383ab94fadf1fba5eb ] There was a few false alarms sighted on target side about wrong data digest while performing high throughput load to XFS filesystem shared through NVMoF TCP. This flag tells the rest of the kernel to ensure that the data buffer does not

Re: [PATCH] MAINTAINERS: Add Geert as Renesas SoC Co-Maintainer

2019-07-29 Thread Niklas Söderlund
Hi Geert, Simon, On 2019-07-29 19:56:58 +0200, Geert Uytterhoeven wrote: > At the end of the v5.3 upstream kernel development cycle, Simon will be > stepping down from his role as Renesas SoC maintainer. Starting with > the v5.4 development cycle, Geert is taking over this role. I would like to

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