[PATCH AUTOSEL 4.4 09/35] tty: serial: msm_serial: avoid system lockup condition

2019-07-18 Thread Sasha Levin
From: Jorge Ramirez-Ortiz [ Upstream commit ba3684f99f1b25d2a30b6956d02d339d7acb9799 ] The function msm_wait_for_xmitr can be taken with interrupts disabled. In order to avoid a potential system lockup - demonstrated under stress testing conditions on SoC QCS404/5 - make sure we wait for a bound

[PATCH AUTOSEL 4.4 07/35] memstick: Fix error cleanup path of memstick_init

2019-07-18 Thread Sasha Levin
From: Wang Hai [ Upstream commit 65f1a0d39c289bb6fc85635528cd36c4b07f560e ] If bus_register fails. On its error handling path, it has cleaned up what it has done. There is no need to call bus_unregister again. Otherwise, if bus_unregister is called, issues such as null-ptr-deref will arise. Syz

[PATCH AUTOSEL 4.9 40/45] powerpc/eeh: Handle hugepages in ioremap space

2019-07-18 Thread Sasha Levin
From: Oliver O'Halloran [ 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. De

[PATCH AUTOSEL 4.9 44/45] mm/mmu_notifier: use hlist_add_head_rcu()

2019-07-18 Thread Sasha Levin
From: Jean-Philippe Brucker [ 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

[PATCH AUTOSEL 4.4 02/35] usb: core: hub: Disable hub-initiated U1/U2

2019-07-18 Thread Sasha Levin
From: Thinh Nguyen [ Upstream commit 561759292774707b71ee61aecc07724905bb7ef1 ] If the device rejects the control transfer to enable device-initiated U1/U2 entry, then the device will not initiate U1/U2 transition. To improve the performance, the downstream port should not initate transition to

[PATCH AUTOSEL 4.4 11/35] phy: renesas: rcar-gen2: Fix memory leak at error paths

2019-07-18 Thread Sasha Levin
From: Yoshihiro Shimoda [ Upstream commit d4a36e82924d3305a17ac987a510f3902df5a4b2 ] This patch fixes memory leak at error paths of the probe function. In for_each_child_of_node, if the loop returns, the driver should call of_put_node() before returns. Reported-by: Julia Lawall Fixes: 1233f59f

[PATCH AUTOSEL 4.4 12/35] powerpc/pseries/mobility: prevent cpu hotplug during DT update

2019-07-18 Thread Sasha Levin
From: Nathan Lynch [ Upstream commit e59a175faa8df9d674247946f2a5a9c29c835725 ] CPU online/offline code paths are sensitive to parts of the device tree (various cpu node properties, cache nodes) that can be changed as a result of a migration. Prevent CPU hotplug while the device tree potentiall

[PATCH AUTOSEL 4.4 15/35] powerpc/pci/of: Fix OF flags parsing for 64bit BARs

2019-07-18 Thread Sasha Levin
From: Alexey Kardashevskiy [ Upstream commit df5be5be8735ef2ae80d5ae1f2453cd81a035c4b ] When the firmware does PCI BAR resource allocation, it passes the assigned addresses and flags (prefetch/64bit/...) via the "reg" property of a PCI device device tree node so the kernel does not need to do re

[PATCH AUTOSEL 4.4 08/35] tty/serial: digicolor: Fix digicolor-usart already registered warning

2019-07-18 Thread Sasha Levin
From: Kefeng Wang [ Upstream commit c7ad9ba0611c53cfe194223db02e3bca015f0674 ] When modprobe/rmmod/modprobe module, if platform_driver_register() fails, the kernel complained, proc_dir_entry 'driver/digicolor-usart' already registered WARNING: CPU: 1 PID: 5636 at fs/proc/generic.c:360 proc_

[PATCH AUTOSEL 4.4 01/35] drm/panel: simple: Fix panel_simple_dsi_probe

2019-07-18 Thread Sasha Levin
From: Peter Ujfalusi [ Upstream commit 7ad9db66fafb0f0ad53fd2a66217105da5ddeffe ] In case mipi_dsi_attach() fails remove the registered panel to avoid added panel without corresponding device. Signed-off-by: Peter Ujfalusi Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org

[PATCH AUTOSEL 4.4 03/35] tty: max310x: Fix invalid baudrate divisors calculator

2019-07-18 Thread Sasha Levin
From: Serge Semin [ Upstream commit 35240ba26a932b279a513f66fa4cabfd7af55221 ] Current calculator doesn't do it' job quite correct. First of all the max310x baud-rates generator supports the divisor being less than 16. In this case the x2/x4 modes can be used to double or quadruple the reference

[PATCH AUTOSEL 4.9 45/45] locking/lockdep: Fix lock used or unused stats error

2019-07-18 Thread Sasha Levin
From: Yuyang Du [ 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. Howeve

[PATCH AUTOSEL 4.4 31/35] sh: prevent warnings when using iounmap

2019-07-18 Thread Sasha Levin
From: Sam Ravnborg [ 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'

[PATCH AUTOSEL 4.4 29/35] mailbox: handle failed named mailbox channel request

2019-07-18 Thread Sasha Levin
From: morten petersen [ 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 i

[PATCH AUTOSEL 4.4 26/35] kallsyms: exclude kasan local symbols on s390

2019-07-18 Thread Sasha Levin
From: Vasily Gorbik [ 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:

[PATCH AUTOSEL 4.4 33/35] 9p: pass the correct prototype to read_cache_page

2019-07-18 Thread Sasha Levin
From: Christoph Hellwig [ Upstream commit f053cbd4366051d7eb6ba1b8d529d20f719c2963 ] Fix the callback 9p passes to read_cache_page to actually have the proper type expected. Casting around function pointers can easily hide typing bugs, and defeats control flow protection. Link: http://lkml.ker

[PATCH AUTOSEL 4.4 34/35] mm/mmu_notifier: use hlist_add_head_rcu()

2019-07-18 Thread Sasha Levin
From: Jean-Philippe Brucker [ 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

[PATCH AUTOSEL 4.4 35/35] locking/lockdep: Fix lock used or unused stats error

2019-07-18 Thread Sasha Levin
From: Yuyang Du [ 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. Howeve

[PATCH AUTOSEL 4.4 21/35] mfd: arizona: Fix undefined behavior

2019-07-18 Thread Sasha Levin
From: Arnd Bergmann [ Upstream commit 5da6cbcd2f395981aa9bfc571ace99f1c786c985 ] When the driver is used with a subdevice that is disabled in the kernel configuration, clang gets a little confused about the control flow and fails to notice that n_subdevs is only uninitialized when subdevs is NUL

[PATCH AUTOSEL 4.4 32/35] mm/kmemleak.c: fix check for softirq context

2019-07-18 Thread Sasha Levin
From: Dmitry Vyukov [ 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_softi

[PATCH AUTOSEL 4.4 27/35] perf test mmap-thread-lookup: Initialize variable to suppress memory sanitizer warning

2019-07-18 Thread Sasha Levin
From: Numfor Mbiziwo-Tiapo [ 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

[PATCH AUTOSEL 4.4 20/35] mfd: core: Set fwnode for created devices

2019-07-18 Thread Sasha Levin
From: Robert Hancock [ 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. Sign

[PATCH AUTOSEL 4.4 30/35] powerpc/eeh: Handle hugepages in ioremap space

2019-07-18 Thread Sasha Levin
From: Oliver O'Halloran [ 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. De

[PATCH AUTOSEL 4.4 25/35] PCI: tegra: Enable Relaxed Ordering only for Tegra20 & Tegra30

2019-07-18 Thread Sasha Levin
From: Vidya Sagar [ Upstream commit 7be142caabc4780b13a522c485abc806de5c4114 ] The PCI Tegra controller conversion to a device tree configurable driver in commit d1523b52bff3 ("PCI: tegra: Move PCIe driver to drivers/pci/host") implied that code for the driver can be compiled in for a kernel sup

[PATCH AUTOSEL 4.4 22/35] um: Silence lockdep complaint about mmap_sem

2019-07-18 Thread Sasha Levin
From: Johannes Berg [ Upstream commit 80bf6ceaf9310b3f61934c69b382d4912deee049 ] When we get into activate_mm(), lockdep complains that we're doing something strange: WARNING: possible circular locking dependency detected 5.1.0-10252-gb00152307319-dirty #121 Not tainted

[PATCH AUTOSEL 4.4 24/35] serial: sh-sci: Fix TX DMA buffer flushing and workqueue races

2019-07-18 Thread Sasha Levin
From: Geert Uytterhoeven [ Upstream commit 8493eab02608b0e82f67b892aa72882e510c31d0 ] When uart_flush_buffer() is called, the .flush_buffer() callback zeroes the tx_dma_len field. This may race with the work queue function handling transmit DMA requests: 1. If the buffer is flushed before th

[PATCH AUTOSEL 4.4 17/35] iio: st_accel: fix iio_triggered_buffer_{pre,post}enable positions

2019-07-18 Thread Sasha Levin
From: Alexandru Ardelean [ Upstream commit 05b8bcc96278c9ef927a6f25a98e233e55de42e1 ] The iio_triggered_buffer_{predisable,postenable} functions attach/detach the poll functions. For the predisable hook, the disable code should occur before detaching the poll func, and for the postenable hook,

[PATCH AUTOSEL 4.4 18/35] iio: iio-utils: Fix possible incorrect mask calculation

2019-07-18 Thread Sasha Levin
From: Bastien Nocera [ Upstream commit 208a68c8393d6041a9086299f3d7943d44d6 ] On some machines, iio-sensor-proxy was returning all 0's for IIO sensor values. It turns out that the bits_used for this sensor is 32, which makes the mask calculation: *mask = (1 << 32) - 1; If the compiler inte

[PATCH AUTOSEL 4.4 16/35] PCI: sysfs: Ignore lockdep for remove attribute

2019-07-18 Thread Sasha Levin
From: Marek Vasut [ Upstream commit dc6b698a86fe40a50525433eb8e92a267847f6f9 ] With CONFIG_PROVE_LOCKING=y, using sysfs to remove a bridge with a device below it causes a lockdep warning, e.g., # echo 1 > /sys/class/pci_bus/:00/device/:00:00.0/remove

[PATCH AUTOSEL 4.4 23/35] powerpc/4xx/uic: clear pending interrupt after irq type/pol change

2019-07-18 Thread Sasha Levin
From: Christian Lamparter [ Upstream commit 3ab3a0689e74e6aa5b41360bc18861040ddef5b1 ] When testing out gpio-keys with a button, a spurious interrupt (and therefore a key press or release event) gets triggered as soon as the driver enables the irq line for the first time. This patch clears any

[PATCH AUTOSEL 4.4 19/35] recordmcount: Fix spurious mcount entries on powerpc

2019-07-18 Thread Sasha Levin
From: "Naveen N. Rao" [ 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 a

[PATCH AUTOSEL 4.4 05/35] tty: serial: cpm_uart - fix init when SMC is relocated

2019-07-18 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit 06aaa3d066db87e8478522d910285141d44b1e58 ] SMC relocation can also be activated earlier by the bootloader, so the driver's behaviour cannot rely on selected kernel config. When the SMC is relocated, CPM_CR_INIT_TRX cannot be used. But the only thing CPM

[PATCH AUTOSEL 4.4 13/35] powerpc/pseries/mobility: rebuild cacheinfo hierarchy post-migration

2019-07-18 Thread Sasha Levin
From: Nathan Lynch [ Upstream commit e610a466d16a086e321f0bd421e2fc75cff28605 ] It's common for the platform to replace the cache device nodes after a migration. Since the cacheinfo code is never informed about this, it never drops its references to the source system's cache nodes, causing it to

[PATCH AUTOSEL 4.4 14/35] usb: gadget: Zero ffs_io_data

2019-07-18 Thread Sasha Levin
From: Andrzej Pietrasiewicz [ Upstream commit 508595515f4bcfe36246e4a565cf280937aeaade ] In some cases the "Allocate & copy" block in ffs_epfile_io() is not executed. Consequently, in such a case ffs_alloc_buffer() is never called and struct ffs_io_data is not initialized properly. This in turn

[PATCH AUTOSEL 4.4 06/35] drm/edid: Fix a missing-check bug in drm_load_edid_firmware()

2019-07-18 Thread Sasha Levin
From: Gen Zhang [ Upstream commit 9f1f1a2dab38d4ce87a13565cf4dc1b73bef3a5f ] In drm_load_edid_firmware(), fwstr is allocated by kstrdup(). And fwstr is dereferenced in the following codes. However, memory allocation functions such as kstrdup() may fail and returns NULL. Dereferencing this null p

[PATCH AUTOSEL 4.9 20/45] iio: st_accel: fix iio_triggered_buffer_{pre,post}enable positions

2019-07-18 Thread Sasha Levin
From: Alexandru Ardelean [ Upstream commit 05b8bcc96278c9ef927a6f25a98e233e55de42e1 ] The iio_triggered_buffer_{predisable,postenable} functions attach/detach the poll functions. For the predisable hook, the disable code should occur before detaching the poll func, and for the postenable hook,

[PATCH AUTOSEL 4.9 42/45] mm/kmemleak.c: fix check for softirq context

2019-07-18 Thread Sasha Levin
From: Dmitry Vyukov [ 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_softi

[PATCH AUTOSEL 4.4 04/35] pinctrl: rockchip: fix leaked of_node references

2019-07-18 Thread Sasha Levin
From: Wen Yang [ Upstream commit 3c89c70634bb0b6f48512de873e7a45c7e1fbaa5 ] The call to of_parse_phandle returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings: ./drivers/pinctrl/pinctrl-ro

[PATCH AUTOSEL 4.9 37/45] powerpc/boot: add {get, put}_unaligned_be32 to xz_config.h

2019-07-18 Thread Sasha Levin
From: Masahiro Yamada [ Upstream commit 9e005b761e7ad153dcf40a6cba1d681fe0830ac6 ] The next commit will make the way of passing CONFIG options more robust. Unfortunately, it would uncover another hidden issue; without this commit, skiroot_defconfig would be broken like this: | WRAParch/po

[PATCH AUTOSEL 4.9 22/45] PCI: xilinx-nwl: Fix Multi MSI data programming

2019-07-18 Thread Sasha Levin
From: Bharat Kumar Gogada [ Upstream commit 181fa434d0514e40ebf6e9721f2b72700287b6e2 ] According to the PCI Local Bus specification Revision 3.0, section 6.8.1.3 (Message Control for MSI), endpoints that are Multiple Message Capable as defined by bits [3:1] in the Message Control for MSI can req

[PATCH AUTOSEL 4.9 43/45] 9p: pass the correct prototype to read_cache_page

2019-07-18 Thread Sasha Levin
From: Christoph Hellwig [ Upstream commit f053cbd4366051d7eb6ba1b8d529d20f719c2963 ] Fix the callback 9p passes to read_cache_page to actually have the proper type expected. Casting around function pointers can easily hide typing bugs, and defeats control flow protection. Link: http://lkml.ker

[PATCH AUTOSEL 4.9 39/45] mailbox: handle failed named mailbox channel request

2019-07-18 Thread Sasha Levin
From: morten petersen [ 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 i

[PATCH AUTOSEL 4.9 32/45] serial: sh-sci: Fix TX DMA buffer flushing and workqueue races

2019-07-18 Thread Sasha Levin
From: Geert Uytterhoeven [ Upstream commit 8493eab02608b0e82f67b892aa72882e510c31d0 ] When uart_flush_buffer() is called, the .flush_buffer() callback zeroes the tx_dma_len field. This may race with the work queue function handling transmit DMA requests: 1. If the buffer is flushed before th

[PATCH AUTOSEL 4.9 35/45] perf test mmap-thread-lookup: Initialize variable to suppress memory sanitizer warning

2019-07-18 Thread Sasha Levin
From: Numfor Mbiziwo-Tiapo [ 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

[PATCH AUTOSEL 4.9 34/45] kallsyms: exclude kasan local symbols on s390

2019-07-18 Thread Sasha Levin
From: Vasily Gorbik [ 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:

[PATCH AUTOSEL 4.9 29/45] powerpc/4xx/uic: clear pending interrupt after irq type/pol change

2019-07-18 Thread Sasha Levin
From: Christian Lamparter [ Upstream commit 3ab3a0689e74e6aa5b41360bc18861040ddef5b1 ] When testing out gpio-keys with a button, a spurious interrupt (and therefore a key press or release event) gets triggered as soon as the driver enables the irq line for the first time. This patch clears any

[PATCH AUTOSEL 4.9 26/45] mfd: arizona: Fix undefined behavior

2019-07-18 Thread Sasha Levin
From: Arnd Bergmann [ Upstream commit 5da6cbcd2f395981aa9bfc571ace99f1c786c985 ] When the driver is used with a subdevice that is disabled in the kernel configuration, clang gets a little confused about the control flow and fails to notice that n_subdevs is only uninitialized when subdevs is NUL

[PATCH AUTOSEL 4.9 11/45] tty: serial: msm_serial: avoid system lockup condition

2019-07-18 Thread Sasha Levin
From: Jorge Ramirez-Ortiz [ Upstream commit ba3684f99f1b25d2a30b6956d02d339d7acb9799 ] The function msm_wait_for_xmitr can be taken with interrupts disabled. In order to avoid a potential system lockup - demonstrated under stress testing conditions on SoC QCS404/5 - make sure we wait for a bound

[PATCH AUTOSEL 4.9 27/45] mfd: hi655x-pmic: Fix missing return value check for devm_regmap_init_mmio_clk

2019-07-18 Thread Sasha Levin
From: Axel Lin [ Upstream commit 7efd105c27fd2323789b41b64763a0e33ed79c08 ] Since devm_regmap_init_mmio_clk can fail, add return value checking. Signed-off-by: Axel Lin Acked-by: Chen Feng Signed-off-by: Lee Jones Signed-off-by: Sasha Levin --- drivers/mfd/hi655x-pmic.c | 2 ++ 1 file chan

[PATCH AUTOSEL 4.9 31/45] serial: sh-sci: Terminate TX DMA during buffer flushing

2019-07-18 Thread Sasha Levin
From: Geert Uytterhoeven [ 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

[PATCH AUTOSEL 4.9 16/45] tty: serial_core: Set port active bit in uart_port_activate

2019-07-18 Thread Sasha Levin
From: Serge Semin [ Upstream commit 13b18d35909707571af9539f7731389fbf0feb31 ] A bug was introduced by commit b3b576461864 ("tty: serial_core: convert uart_open to use tty_port_open"). It caused a constant warning printed into the system log regarding the tty and port counter mismatch: [ 21.6

[PATCH AUTOSEL 4.14 44/60] perf session: Fix potential NULL pointer dereference found by the smatch tool

2019-07-18 Thread Sasha Levin
From: Leo Yan [ Upstream commit f3c8d90757724982e5f07cd77d315eb64ca145ac ] Based on the following report from Smatch, fix the potential NULL pointer dereference check. tools/perf/util/session.c:1252 dump_read() error: we previously assumed 'evsel' could be null (see line 1249) tools/pe

[PATCH AUTOSEL 4.9 02/45] usb: core: hub: Disable hub-initiated U1/U2

2019-07-18 Thread Sasha Levin
From: Thinh Nguyen [ Upstream commit 561759292774707b71ee61aecc07724905bb7ef1 ] If the device rejects the control transfer to enable device-initiated U1/U2 entry, then the device will not initiate U1/U2 transition. To improve the performance, the downstream port should not initate transition to

[PATCH AUTOSEL 4.14 51/60] powerpc/eeh: Handle hugepages in ioremap space

2019-07-18 Thread Sasha Levin
From: Oliver O'Halloran [ 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. De

[PATCH AUTOSEL 4.14 58/60] mm/gup.c: remove some BUG_ONs from get_gate_page()

2019-07-18 Thread Sasha Levin
From: Andy Lutomirski [ 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-o

[PATCH AUTOSEL 4.14 48/60] powerpc/boot: add {get, put}_unaligned_be32 to xz_config.h

2019-07-18 Thread Sasha Levin
From: Masahiro Yamada [ Upstream commit 9e005b761e7ad153dcf40a6cba1d681fe0830ac6 ] The next commit will make the way of passing CONFIG options more robust. Unfortunately, it would uncover another hidden issue; without this commit, skiroot_defconfig would be broken like this: | WRAParch/po

[PATCH AUTOSEL 4.9 09/45] memstick: Fix error cleanup path of memstick_init

2019-07-18 Thread Sasha Levin
From: Wang Hai [ Upstream commit 65f1a0d39c289bb6fc85635528cd36c4b07f560e ] If bus_register fails. On its error handling path, it has cleaned up what it has done. There is no need to call bus_unregister again. Otherwise, if bus_unregister is called, issues such as null-ptr-deref will arise. Syz

[PATCH AUTOSEL 4.9 04/45] pinctrl: rockchip: fix leaked of_node references

2019-07-18 Thread Sasha Levin
From: Wen Yang [ Upstream commit 3c89c70634bb0b6f48512de873e7a45c7e1fbaa5 ] The call to of_parse_phandle returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings: ./drivers/pinctrl/pinctrl-ro

[PATCH AUTOSEL 4.9 01/45] drm/panel: simple: Fix panel_simple_dsi_probe

2019-07-18 Thread Sasha Levin
From: Peter Ujfalusi [ Upstream commit 7ad9db66fafb0f0ad53fd2a66217105da5ddeffe ] In case mipi_dsi_attach() fails remove the registered panel to avoid added panel without corresponding device. Signed-off-by: Peter Ujfalusi Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org

[PATCH AUTOSEL 4.14 41/60] PCI: tegra: Enable Relaxed Ordering only for Tegra20 & Tegra30

2019-07-18 Thread Sasha Levin
From: Vidya Sagar [ Upstream commit 7be142caabc4780b13a522c485abc806de5c4114 ] The PCI Tegra controller conversion to a device tree configurable driver in commit d1523b52bff3 ("PCI: tegra: Move PCIe driver to drivers/pci/host") implied that code for the driver can be compiled in for a kernel sup

[PATCH AUTOSEL 4.14 53/60] block/bio-integrity: fix a memory leak bug

2019-07-18 Thread Sasha Levin
From: Wenwen Wang [ Upstream commit e7bf90e5afe3aa1d1282c1635a49e17a32c4ecec ] In bio_integrity_prep(), a kernel buffer is allocated through kmalloc() to hold integrity metadata. Later on, the buffer will be attached to the bio structure through bio_integrity_add_page(), which returns the number

[PATCH AUTOSEL 4.9 06/45] drm/edid: Fix a missing-check bug in drm_load_edid_firmware()

2019-07-18 Thread Sasha Levin
From: Gen Zhang [ Upstream commit 9f1f1a2dab38d4ce87a13565cf4dc1b73bef3a5f ] In drm_load_edid_firmware(), fwstr is allocated by kstrdup(). And fwstr is dereferenced in the following codes. However, memory allocation functions such as kstrdup() may fail and returns NULL. Dereferencing this null p

[PATCH AUTOSEL 4.14 49/60] f2fs: avoid out-of-range memory access

2019-07-18 Thread Sasha Levin
From: Ocean Chen [ 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

[PATCH AUTOSEL 4.14 45/60] perf annotate: Fix dereferencing freed memory found by the smatch tool

2019-07-18 Thread Sasha Levin
From: Leo Yan [ Upstream commit 600c787dbf6521d8d07ee717ab7606d5070103ea ] Based on the following report from Smatch, fix the potential dereferencing freed memory check. tools/perf/util/annotate.c:1125 disasm_line__parse() error: dereferencing freed memory 'namep' tools/perf/util/annotat

[PATCH AUTOSEL 4.19 091/101] mm/gup.c: remove some BUG_ONs from get_gate_page()

2019-07-18 Thread Sasha Levin
From: Andy Lutomirski [ 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-o

[PATCH AUTOSEL 4.19 094/101] proc: use down_read_killable mmap_sem for /proc/pid/smaps_rollup

2019-07-18 Thread Sasha Levin
From: Konstantin Khlebnikov [ 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

[PATCH AUTOSEL 4.14 40/60] serial: sh-sci: Fix TX DMA buffer flushing and workqueue races

2019-07-18 Thread Sasha Levin
From: Geert Uytterhoeven [ Upstream commit 8493eab02608b0e82f67b892aa72882e510c31d0 ] When uart_flush_buffer() is called, the .flush_buffer() callback zeroes the tx_dma_len field. This may race with the work queue function handling transmit DMA requests: 1. If the buffer is flushed before th

Re: [PATCH v3 0/6] Introduce Bandwidth OPPs for interconnect paths

2019-07-18 Thread Saravana Kannan
On Wed, Jul 17, 2019 at 10:37 PM Viresh Kumar wrote: > > I know you have explained lots of things earlier as well, but they are > available over multiple threads and I don't know where to reply now :) > > Lets have proper discussion (once again) here and be done with it. > Sorry for the trouble of

[PATCH AUTOSEL 4.14 27/60] iio: st_accel: fix iio_triggered_buffer_{pre,post}enable positions

2019-07-18 Thread Sasha Levin
From: Alexandru Ardelean [ Upstream commit 05b8bcc96278c9ef927a6f25a98e233e55de42e1 ] The iio_triggered_buffer_{predisable,postenable} functions attach/detach the poll functions. For the predisable hook, the disable code should occur before detaching the poll func, and for the postenable hook,

[PATCH AUTOSEL 4.14 14/60] serial: 8250: Fix TX interrupt handling condition

2019-07-18 Thread Sasha Levin
From: Rautkoski Kimmo EXT [ Upstream commit db1b5bc047b3cadaedab3826bba82c3d9e023c4b ] Interrupt handler checked THRE bit (transmitter holding register empty) in LSR to detect if TX fifo is empty. In case when there is only receive interrupts the TX handling got called because THRE bit in LSR is

[PATCH AUTOSEL 4.14 32/60] recordmcount: Fix spurious mcount entries on powerpc

2019-07-18 Thread Sasha Levin
From: "Naveen N. Rao" [ 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 a

[PATCH AUTOSEL 4.14 35/60] mfd: hi655x-pmic: Fix missing return value check for devm_regmap_init_mmio_clk

2019-07-18 Thread Sasha Levin
From: Axel Lin [ Upstream commit 7efd105c27fd2323789b41b64763a0e33ed79c08 ] Since devm_regmap_init_mmio_clk can fail, add return value checking. Signed-off-by: Axel Lin Acked-by: Chen Feng Signed-off-by: Lee Jones Signed-off-by: Sasha Levin --- drivers/mfd/hi655x-pmic.c | 2 ++ 1 file chan

[PATCH AUTOSEL 4.14 08/60] drm/bridge: tc358767: read display_props in get_modes()

2019-07-18 Thread Sasha Levin
From: Tomi Valkeinen [ Upstream commit 3231573065ad4f4ecc5c9147b24f29f846dc0c2f ] We need to know the link bandwidth to filter out modes we cannot support, so we need to have read the display props before doing the filtering. To ensure we have up to date display props, call tc_get_display_props

[PATCH AUTOSEL 4.14 24/60] drm/msm: Depopulate platform on probe failure

2019-07-18 Thread Sasha Levin
From: Sean Paul [ Upstream commit 4368a1539c6b41ac3cddc06f5a5117952998804c ] add_display_components() calls of_platform_populate, and we depopluate on pdev remove, but not when probe fails. So if we get a probe deferral in one of the components, we won't depopulate the platform. This causes the

[PATCH AUTOSEL 4.14 29/60] PCI: xilinx-nwl: Fix Multi MSI data programming

2019-07-18 Thread Sasha Levin
From: Bharat Kumar Gogada [ Upstream commit 181fa434d0514e40ebf6e9721f2b72700287b6e2 ] According to the PCI Local Bus specification Revision 3.0, section 6.8.1.3 (Message Control for MSI), endpoints that are Multiple Message Capable as defined by bits [3:1] in the Message Control for MSI can req

[PATCH AUTOSEL 4.14 16/60] phy: renesas: rcar-gen2: Fix memory leak at error paths

2019-07-18 Thread Sasha Levin
From: Yoshihiro Shimoda [ Upstream commit d4a36e82924d3305a17ac987a510f3902df5a4b2 ] This patch fixes memory leak at error paths of the probe function. In for_each_child_of_node, if the loop returns, the driver should call of_put_node() before returns. Reported-by: Julia Lawall Fixes: 1233f59f

[PATCH AUTOSEL 4.14 31/60] powerpc/xmon: Fix disabling tracing while in xmon

2019-07-18 Thread Sasha Levin
From: "Naveen N. Rao" [ Upstream commit aaf06665f7ea3ee9f9754e16c1a507a89f1de5b1 ] Commit ed49f7fd6438d ("powerpc/xmon: Disable tracing when entering xmon") added code to disable recording trace entries while in xmon. The commit introduced a variable 'tracing_enabled' to record if tracing was en

[PATCH AUTOSEL 4.14 28/60] kbuild: Add -Werror=unknown-warning-option to CLANG_FLAGS

2019-07-18 Thread Sasha Levin
From: Nathan Chancellor [ Upstream commit 589834b3a0097a4908f4112eac0ca2feb486fa32 ] In commit ebcc5928c5d9 ("arm64: Silence gcc warnings about arch ABI drift"), the arm64 Makefile added -Wno-psabi to KBUILD_CFLAGS, which is a GCC only option so clang rightfully complains: warning: unknown warn

[PATCH AUTOSEL 4.14 39/60] serial: sh-sci: Terminate TX DMA during buffer flushing

2019-07-18 Thread Sasha Levin
From: Geert Uytterhoeven [ 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

[PATCH AUTOSEL 4.14 34/60] mfd: arizona: Fix undefined behavior

2019-07-18 Thread Sasha Levin
From: Arnd Bergmann [ Upstream commit 5da6cbcd2f395981aa9bfc571ace99f1c786c985 ] When the driver is used with a subdevice that is disabled in the kernel configuration, clang gets a little confused about the control flow and fails to notice that n_subdevs is only uninitialized when subdevs is NUL

[PATCH AUTOSEL 4.14 12/60] tty/serial: digicolor: Fix digicolor-usart already registered warning

2019-07-18 Thread Sasha Levin
From: Kefeng Wang [ Upstream commit c7ad9ba0611c53cfe194223db02e3bca015f0674 ] When modprobe/rmmod/modprobe module, if platform_driver_register() fails, the kernel complained, proc_dir_entry 'driver/digicolor-usart' already registered WARNING: CPU: 1 PID: 5636 at fs/proc/generic.c:360 proc_

[PATCH AUTOSEL 4.14 20/60] tty: serial_core: Set port active bit in uart_port_activate

2019-07-18 Thread Sasha Levin
From: Serge Semin [ Upstream commit 13b18d35909707571af9539f7731389fbf0feb31 ] A bug was introduced by commit b3b576461864 ("tty: serial_core: convert uart_open to use tty_port_open"). It caused a constant warning printed into the system log regarding the tty and port counter mismatch: [ 21.6

[PATCH AUTOSEL 4.14 19/60] iio:core: Fix bug in length of event info_mask and catch unhandled bits set in masks.

2019-07-18 Thread Sasha Levin
From: Young Xiao <92siuy...@gmail.com> [ Upstream commit 936d3e536dcf88ce80d27bdb637009b13dba6d8c ] The incorrect limit for the for_each_set_bit loop was noticed whilst fixing this other case. Note that as we only have 3 possible entries a the moment and the value was set to 4, the bug would not

[PATCH AUTOSEL 4.14 17/60] powerpc/pseries/mobility: prevent cpu hotplug during DT update

2019-07-18 Thread Sasha Levin
From: Nathan Lynch [ Upstream commit e59a175faa8df9d674247946f2a5a9c29c835725 ] CPU online/offline code paths are sensitive to parts of the device tree (various cpu node properties, cache nodes) that can be changed as a result of a migration. Prevent CPU hotplug while the device tree potentiall

[PATCH AUTOSEL 4.19 099/101] proc: use down_read_killable mmap_sem for /proc/pid/maps

2019-07-18 Thread Sasha Levin
From: Konstantin Khlebnikov [ 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.ke

[PATCH AUTOSEL 4.19 093/101] mm/mmu_notifier: use hlist_add_head_rcu()

2019-07-18 Thread Sasha Levin
From: Jean-Philippe Brucker [ 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

[PATCH AUTOSEL 4.19 085/101] s390/dasd: Make layout analysis ESE compatible

2019-07-18 Thread Sasha Levin
From: Jan Höppner [ Upstream commit ce6915f5343f5f2a2a937b683d8ffbf12dab3ad4 ] The disk layout and volume information of a DASD reside in the first two tracks of cylinder 0. When a DASD is set online, currently the first three tracks are read and analysed to confirm an expected layout. For CDL

[PATCH AUTOSEL 4.19 098/101] cxgb4: reduce kernel stack usage in cudbg_collect_mem_region()

2019-07-18 Thread Sasha Levin
From: Arnd Bergmann [ 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

[PATCH AUTOSEL 4.19 074/101] perf session: Fix potential NULL pointer dereference found by the smatch tool

2019-07-18 Thread Sasha Levin
From: Leo Yan [ Upstream commit f3c8d90757724982e5f07cd77d315eb64ca145ac ] Based on the following report from Smatch, fix the potential NULL pointer dereference check. tools/perf/util/session.c:1252 dump_read() error: we previously assumed 'evsel' could be null (see line 1249) tools/pe

[PATCH AUTOSEL 4.19 083/101] dlm: check if workqueues are NULL before flushing/destroying

2019-07-18 Thread Sasha Levin
From: David Windsor [ 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 f

[PATCH AUTOSEL 4.19 095/101] proc: use down_read_killable mmap_sem for /proc/pid/pagemap

2019-07-18 Thread Sasha Levin
From: Konstantin Khlebnikov [ 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.

[PATCH AUTOSEL 4.19 076/101] perf hists browser: Fix potential NULL pointer dereference found by the smatch tool

2019-07-18 Thread Sasha Levin
From: Leo Yan [ Upstream commit ceb75476db1617a88cc29b09839acacb69aa076e ] Based on the following report from Smatch, fix the potential NULL pointer dereference check. tools/perf/ui/browsers/hists.c:641 hist_browser__run() error: we previously assumed 'hbt' could be null (see line 625)

[PATCH AUTOSEL 4.19 072/101] perf stat: Fix use-after-freed pointer detected by the smatch tool

2019-07-18 Thread Sasha Levin
From: Leo Yan [ Upstream commit c74b05030edb3b52f4208d8415b8c933bc509a29 ] Based on the following report from Smatch, fix the use-after-freed pointer. tools/perf/builtin-stat.c:1353 add_default_attributes() warn: passing freed memory 'str'. The pointer 'str' has been freed but later it is

[PATCH AUTOSEL 4.19 078/101] PCI: dwc: pci-dra7xx: Fix compilation when !CONFIG_GPIOLIB

2019-07-18 Thread Sasha Levin
From: YueHaibing [ Upstream commit 381ed79c8655a40268ee7391f716edd90c5c3a97 ] If CONFIG_GPIOLIB is not selected the compilation results in the following build errors: drivers/pci/controller/dwc/pci-dra7xx.c: In function dra7xx_pcie_probe: drivers/pci/controller/dwc/pci-dra7xx.c:777:10: error:

[PATCH AUTOSEL 4.14 05/60] tty: serial: cpm_uart - fix init when SMC is relocated

2019-07-18 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit 06aaa3d066db87e8478522d910285141d44b1e58 ] SMC relocation can also be activated earlier by the bootloader, so the driver's behaviour cannot rely on selected kernel config. When the SMC is relocated, CPM_CR_INIT_TRX cannot be used. But the only thing CPM

[PATCH AUTOSEL 4.19 081/101] f2fs: avoid out-of-range memory access

2019-07-18 Thread Sasha Levin
From: Ocean Chen [ 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

[PATCH AUTOSEL 4.19 075/101] perf annotate: Fix dereferencing freed memory found by the smatch tool

2019-07-18 Thread Sasha Levin
From: Leo Yan [ Upstream commit 600c787dbf6521d8d07ee717ab7606d5070103ea ] Based on the following report from Smatch, fix the potential dereferencing freed memory check. tools/perf/util/annotate.c:1125 disasm_line__parse() error: dereferencing freed memory 'namep' tools/perf/util/annotat

[PATCH AUTOSEL 4.19 089/101] 9p: pass the correct prototype to read_cache_page

2019-07-18 Thread Sasha Levin
From: Christoph Hellwig [ Upstream commit f053cbd4366051d7eb6ba1b8d529d20f719c2963 ] Fix the callback 9p passes to read_cache_page to actually have the proper type expected. Casting around function pointers can easily hide typing bugs, and defeats control flow protection. Link: http://lkml.ker

[PATCH AUTOSEL 4.14 07/60] PCI: Return error if cannot probe VF

2019-07-18 Thread Sasha Levin
From: Alex Williamson [ Upstream commit 76002d8b48c4b08c9bd414517dd295e132ad910b ] Commit 0e7df22401a3 ("PCI: Add sysfs sriov_drivers_autoprobe to control VF driver binding") allows the user to specify that drivers for VFs of a PF should not be probed, but it actually causes pci_device_probe() t

[PATCH AUTOSEL 4.19 097/101] proc: use down_read_killable mmap_sem for /proc/pid/map_files

2019-07-18 Thread Sasha Levin
From: Konstantin Khlebnikov [ 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 a

<    1   2   3   4   5   6   7   8   9   10   >