[PATCH 4.14 36/68] HID: apple: Fix stuck function keys when using FN

2019-10-06 Thread Greg Kroah-Hartman
From: Joao Moreno [ Upstream commit aec256d0ecd561036f188dbc8fa7924c47a9edfd ] This fixes an issue in which key down events for function keys would be repeatedly emitted even after the user has raised the physical key. For example, the driver fails to emit the F5 key up event when going through

[PATCH 4.19 001/106] tpm: use tpm_try_get_ops() in tpm-sysfs.c.

2019-10-06 Thread Greg Kroah-Hartman
From: Jarkko Sakkinen commit 2677ca98ae377517930c183248221f69f771c921 upstream Use tpm_try_get_ops() in tpm-sysfs.c so that we can consider moving other decorations (locking, localities, power management for example) inside it. This direction can be of course taken only after other call sites fo

[PATCH 4.14 41/68] ARM: 8903/1: ensure that usable memory in bank 0 starts from a PMD-aligned address

2019-10-06 Thread Greg Kroah-Hartman
From: Mike Rapoport [ Upstream commit 00d2ec1e6bd82c0538e6dd3e4a4040de93ba4fef ] The calculation of memblock_limit in adjust_lowmem_bounds() assumes that bank 0 starts from a PMD-aligned address. However, the beginning of the first bank may be NOMAP memory and the start of usable memory will be

[PATCH 4.19 013/106] clk: qoriq: Fix -Wunused-const-variable

2019-10-06 Thread Greg Kroah-Hartman
From: Nathan Huckleberry [ Upstream commit a95fb581b144b5e73da382eaedb2e32027610597 ] drivers/clk/clk-qoriq.c:138:38: warning: unused variable 'p5020_cmux_grp1' [-Wunused-const-variable] static const struct clockgen_muxinfo p5020_cmux_grp1 drivers/clk/clk-qoriq.c:146:38: warning: unused variabl

[PATCH 4.14 45/68] kbuild: clean compressed initramfs image

2019-10-06 Thread Greg Kroah-Hartman
From: Greg Thelen [ Upstream commit 6279eb3dd7946c69346a3b98473ed13d3a44adb5 ] Since 9e3596b0c653 ("kbuild: initramfs cleanup, set target from Kconfig") "make clean" leaves behind compressed initramfs images. Example: $ make defconfig $ sed -i 's|CONFIG_INITRAMFS_SOURCE=""|CONFIG_INITRAMF

[PATCH 4.19 010/106] gpu: drm: radeon: Fix a possible null-pointer dereference in radeon_connector_set_property()

2019-10-06 Thread Greg Kroah-Hartman
From: Jia-Ju Bai [ Upstream commit f3eb9b8f67bc28783eddc142ad805ebdc53d6339 ] In radeon_connector_set_property(), there is an if statement on line 743 to check whether connector->encoder is NULL: if (connector->encoder) When connector->encoder is NULL, it is used on line 755: if (connec

[PATCH 4.14 55/68] net: Unpublish sk from sk_reuseport_cb before call_rcu

2019-10-06 Thread Greg Kroah-Hartman
From: Martin KaFai Lau [ Upstream commit 8c7138b33e5c690c308b2a7085f6313fdcb3f616 ] The "reuse->sock[]" array is shared by multiple sockets. The going away sk must unpublish itself from "reuse->sock[]" before making call_rcu() call. However, this unpublish-action is currently done after a grac

[PATCH 4.14 51/68] hso: fix NULL-deref on tty open

2019-10-06 Thread Greg Kroah-Hartman
From: Johan Hovold [ Upstream commit 8353da9fa69722b54cba82b2ec740afd3d438748 ] Fix NULL-pointer dereference on tty open due to a failure to handle a missing interrupt-in endpoint when probing modem ports: BUG: kernel NULL pointer dereference, address: 0006 ...

[PATCH 4.14 54/68] net: qlogic: Fix memory leak in ql_alloc_large_buffers

2019-10-06 Thread Greg Kroah-Hartman
From: Navid Emamdoost [ Upstream commit 1acb8f2a7a9f10543868ddd737e37424d5c36cf4 ] In ql_alloc_large_buffers, a new skb is allocated via netdev_alloc_skb. This skb should be released if pci_dma_mapping_error fails. Fixes: 0f8ab89e825f ("qla3xxx: Check return code from pci_map_single() in ql_re

[PATCH 4.14 65/68] Smack: Dont ignore other bprm->unsafe flags if LSM_UNSAFE_PTRACE is set

2019-10-06 Thread Greg Kroah-Hartman
From: Jann Horn commit 3675f052b43ba51b99b85b073c7070e083f3e6fb upstream. There is a logic bug in the current smack_bprm_set_creds(): If LSM_UNSAFE_PTRACE is set, but the ptrace state is deemed to be acceptable (e.g. because the ptracer detached in the meantime), the other ->unsafe flags aren't

[PATCH 4.14 63/68] sch_cbq: validate TCA_CBQ_WRROPT to avoid crash

2019-10-06 Thread Greg Kroah-Hartman
From: Eric Dumazet [ Upstream commit e9789c7cc182484fc031fd88097eb14cb26c4596 ] syzbot reported a crash in cbq_normalize_quanta() caused by an out of range cl->priority. iproute2 enforces this check, but malicious users do not. kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by N

[PATCH 4.14 66/68] smack: use GFP_NOFS while holding inode_smack::smk_lock

2019-10-06 Thread Greg Kroah-Hartman
From: Eric Biggers commit e5bfad3d7acc5702f32aafeb388362994f4d7bd0 upstream. inode_smack::smk_lock is taken during smack_d_instantiate(), which is called during a filesystem transaction when creating a file on ext4. Therefore to avoid a deadlock, all code that takes this lock must use GFP_NOFS,

[PATCH 4.14 60/68] net/rds: Fix error handling in rds_ib_add_one()

2019-10-06 Thread Greg Kroah-Hartman
From: Dotan Barak [ Upstream commit d64bf89a75b65f83f06be9fb8f978e60d53752db ] rds_ibdev:ipaddr_list and rds_ibdev:conn_list are initialized after allocation some resources such as protection domain. If allocation of such resources fail, then these uninitialized variables are accessed in rds_ib_

[PATCH 4.14 62/68] tipc: fix unlimited bundling of small messages

2019-10-06 Thread Greg Kroah-Hartman
From: Tuong Lien [ Upstream commit e95584a889e1902fdf1ded9712e2c3c3083baf96 ] We have identified a problem with the "oversubscription" policy in the link transmission code. When small messages are transmitted, and the sending link has reached the transmit window limit, those messages will be bu

[PATCH 4.14 61/68] xen-netfront: do not use ~0U as error return value for xennet_fill_frags()

2019-10-06 Thread Greg Kroah-Hartman
From: Dongli Zhang [ Upstream commit a761129e3625688310aecf26e1be9e98e85f8eb5 ] xennet_fill_frags() uses ~0U as return value when the sk_buff is not able to cache extra fragments. This is incorrect because the return type of xennet_fill_frags() is RING_IDX and 0x is an expected value for

[PATCH 4.14 38/68] PCI: imx6: Propagate errors for optional regulators

2019-10-06 Thread Greg Kroah-Hartman
From: Thierry Reding [ Upstream commit 2170a09fb4b0f66e06e5bcdcbc98c9ccbf353650 ] regulator_get_optional() can fail for a number of reasons besides probe deferral. It can for example return -ENOMEM if it runs out of memory as it tries to allocate data structures. Propagating only -EPROBE_DEFER i

[PATCH 4.14 57/68] qmi_wwan: add support for Cinterion CLS8 devices

2019-10-06 Thread Greg Kroah-Hartman
From: Reinhard Speyerer [ Upstream commit cf74ac6db25d4002089e85cc623ad149ecc25614 ] Add support for Cinterion CLS8 devices. Use QMI_QUIRK_SET_DTR as required for Qualcomm MDM9x07 chipsets. T: Bus=01 Lev=03 Prnt=05 Port=01 Cnt=02 Dev#= 25 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Pro

[PATCH 4.14 64/68] ipv6: Handle missing host route in __ipv6_ifa_notify

2019-10-06 Thread Greg Kroah-Hartman
From: David Ahern [ Upstream commit 2d819d250a1393a3e725715425ab70a0e0772a71 ] Rajendra reported a kernel panic when a link was taken down: [ 6870.263084] BUG: unable to handle kernel NULL pointer dereference at 00a8 [ 6870.271856] IP: [] __ipv6_ifa_notify+0x154/0x290

[PATCH 4.14 59/68] vsock: Fix a lockdep warning in __vsock_release()

2019-10-06 Thread Greg Kroah-Hartman
From: Dexuan Cui [ Upstream commit 0d9138ffac24cf8b75366ede3a68c951e6dcc575 ] Lockdep is unhappy if two locks from the same class are held. Fix the below warning for hyperv and virtio sockets (vmci socket code doesn't have the issue) by using lock_sock_nested() when __vsock_release() is called

[PATCH 4.14 07/68] drm/stm: attach gem fence to atomic state

2019-10-06 Thread Greg Kroah-Hartman
From: Ahmad Fatoum [ Upstream commit 8fabc9c3109a71b3577959a05408153ae69ccd8d ] To properly synchronize with other devices the fence from the GEM object backing the framebuffer needs to be attached to the atomic state, so the commit work can wait on fence signaling. Signed-off-by: Ahmad Fatoum

[PATCH 4.14 50/68] erspan: remove the incorrect mtu limit for erspan

2019-10-06 Thread Greg Kroah-Hartman
From: Haishuang Yan [ Upstream commit 0e141f757b2c78c983df893e9993313e2dc21e38 ] erspan driver calls ether_setup(), after commit 61e84623ace3 ("net: centralize net_device min/max MTU checking"), the range of mtu is [min_mtu, max_mtu], which is [68, 1500] by default. It causes the dev mtu of the

[PATCH 4.14 09/68] gpu: drm: radeon: Fix a possible null-pointer dereference in radeon_connector_set_property()

2019-10-06 Thread Greg Kroah-Hartman
From: Jia-Ju Bai [ Upstream commit f3eb9b8f67bc28783eddc142ad805ebdc53d6339 ] In radeon_connector_set_property(), there is an if statement on line 743 to check whether connector->encoder is NULL: if (connector->encoder) When connector->encoder is NULL, it is used on line 755: if (connec

[PATCH 4.14 08/68] drm/radeon: Fix EEH during kexec

2019-10-06 Thread Greg Kroah-Hartman
From: KyleMahlkuch [ Upstream commit 6f7fe9a93e6c09bf988c5059403f5f88e17e21e6 ] During kexec some adapters hit an EEH since they are not properly shut down in the radeon_pci_shutdown() function. Adding radeon_suspend_kms() fixes this issue. Signed-off-by: KyleMahlkuch Signed-off-by: Alex Deuch

[PATCH 4.14 06/68] video: ssd1307fb: Start page range at page_offset

2019-10-06 Thread Greg Kroah-Hartman
From: Marko Kohtala [ Upstream commit dd9782834dd9dde3624ff1acea8859f3d3e792d4 ] The page_offset was only applied to the end of the page range. This caused the display updates to cause a scrolling effect on the display because the amount of data written to the display did not match the range dis

[PATCH 4.14 37/68] PCI: rockchip: Propagate errors for optional regulators

2019-10-06 Thread Greg Kroah-Hartman
From: Thierry Reding [ Upstream commit 0e3ff0ac5f71bdb6be2a698de0ed0c7e6e738269 ] regulator_get_optional() can fail for a number of reasons besides probe deferral. It can for example return -ENOMEM if it runs out of memory as it tries to allocate data structures. Propagating only -EPROBE_DEFER i

[PATCH 4.14 49/68] cxgb4:Fix out-of-bounds MSI-X info array access

2019-10-06 Thread Greg Kroah-Hartman
From: Vishal Kulkarni [ Upstream commit 6b517374f4ea5a3c6e307e1219ec5f35d42e6d00 ] When fetching free MSI-X vectors for ULDs, check for the error code before accessing MSI-X info array. Otherwise, an out-of-bounds access is attempted, which results in kernel panic. Fixes: 94cdb8bb993a ("cxgb4:

[PATCH 4.14 47/68] kmemleak: increase DEBUG_KMEMLEAK_EARLY_LOG_SIZE default to 16K

2019-10-06 Thread Greg Kroah-Hartman
From: Nicolas Boichat [ Upstream commit b751c52bb587ae66f773b15204ef7a147467f4c7 ] The current default value (400) is too low on many systems (e.g. some ARM64 platform takes up 1000+ entries). syzbot uses 16000 as default value, and has proved to be enough on beefy configurations, so let's pic

[PATCH 4.14 05/68] drm/panel: simple: fix AUO g185han01 horizontal blanking

2019-10-06 Thread Greg Kroah-Hartman
From: Lucas Stach [ Upstream commit f8c6bfc612b56f02e1b8fae699dff12738aaf889 ] The horizontal blanking periods are too short, as the values are specified for a single LVDS channel. Since this panel is dual LVDS they need to be doubled. With this change the panel reaches its nominal vrefresh rate

[PATCH 4.14 35/68] rtc: snvs: fix possible race condition

2019-10-06 Thread Greg Kroah-Hartman
From: Anson Huang [ Upstream commit 6fd4fe9b496d9ba3382992ff4fde3871d1b6f63d ] The RTC IRQ is requested before the struct rtc_device is allocated, this may lead to a NULL pointer dereference in IRQ handler. To fix this issue, allocating the rtc_device struct before requesting the RTC IRQ using

[PATCH 4.14 33/68] livepatch: Nullify obj->mod in klp_module_coming()s error path

2019-10-06 Thread Greg Kroah-Hartman
From: Miroslav Benes [ Upstream commit 4ff96fb52c6964ad42e0a878be8f86a2e8052ddd ] klp_module_coming() is called for every module appearing in the system. It sets obj->mod to a patched module for klp_object obj. Unfortunately it leaves it set even if an error happens later in the function and the

[PATCH 4.14 29/68] MIPS: tlbex: Explicitly cast _PAGE_NO_EXEC to a boolean

2019-10-06 Thread Greg Kroah-Hartman
From: Nathan Chancellor [ Upstream commit c59ae0a1055127dd3828a88e111a0db59b254104 ] clang warns: arch/mips/mm/tlbex.c:634:19: error: use of logical '&&' with constant operand [-Werror,-Wconstant-logical-operand] if (cpu_has_rixi && _PAGE_NO_EXEC) { ^ ~

[PATCH 4.14 11/68] clk: qoriq: Fix -Wunused-const-variable

2019-10-06 Thread Greg Kroah-Hartman
From: Nathan Huckleberry [ Upstream commit a95fb581b144b5e73da382eaedb2e32027610597 ] drivers/clk/clk-qoriq.c:138:38: warning: unused variable 'p5020_cmux_grp1' [-Wunused-const-variable] static const struct clockgen_muxinfo p5020_cmux_grp1 drivers/clk/clk-qoriq.c:146:38: warning: unused variabl

[PATCH 4.9 39/47] qmi_wwan: add support for Cinterion CLS8 devices

2019-10-06 Thread Greg Kroah-Hartman
From: Reinhard Speyerer [ Upstream commit cf74ac6db25d4002089e85cc623ad149ecc25614 ] Add support for Cinterion CLS8 devices. Use QMI_QUIRK_SET_DTR as required for Qualcomm MDM9x07 chipsets. T: Bus=01 Lev=03 Prnt=05 Port=01 Cnt=02 Dev#= 25 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Pro

[PATCH 4.9 47/47] NFC: fix attrs checks in netlink interface

2019-10-06 Thread Greg Kroah-Hartman
From: Andrey Konovalov commit 18917d51472fe3b126a3a8f756c6b18085eb8130 upstream. nfc_genl_deactivate_target() relies on the NFC_ATTR_TARGET_INDEX attribute being present, but doesn't check whether it is actually provided by the user. Same goes for nfc_genl_fw_download() and NFC_ATTR_FIRMWARE_NAM

[PATCH 4.14 13/68] clk: sirf: Dont reference clk_init_data after registration

2019-10-06 Thread Greg Kroah-Hartman
From: Stephen Boyd [ Upstream commit af55dadfbce35b4f4c6247244ce3e44b2e242b84 ] A future patch is going to change semantics of clk_register() so that clk_hw::init is guaranteed to be NULL after a clk is registered. Avoid referencing this member here so that we don't run into NULL pointer excepti

[PATCH 4.9 44/47] ipv6: Handle missing host route in __ipv6_ifa_notify

2019-10-06 Thread Greg Kroah-Hartman
From: David Ahern [ Upstream commit 2d819d250a1393a3e725715425ab70a0e0772a71 ] Rajendra reported a kernel panic when a link was taken down: [ 6870.263084] BUG: unable to handle kernel NULL pointer dereference at 00a8 [ 6870.271856] IP: [] __ipv6_ifa_notify+0x154/0x290

[PATCH 4.14 02/68] tpm: use tpm_try_get_ops() in tpm-sysfs.c.

2019-10-06 Thread Greg Kroah-Hartman
From: Jarkko Sakkinen commit 2677ca98ae377517930c183248221f69f771c921 upstream Use tpm_try_get_ops() in tpm-sysfs.c so that we can consider moving other decorations (locking, localities, power management for example) inside it. This direction can be of course taken only after other call sites fo

[PATCH 4.14 14/68] clk: zx296718: Dont reference clk_init_data after registration

2019-10-06 Thread Greg Kroah-Hartman
From: Stephen Boyd [ Upstream commit 1a4549c150e27dbc3aea762e879a88209df6d1a5 ] A future patch is going to change semantics of clk_register() so that clk_hw::init is guaranteed to be NULL after a clk is registered. Avoid referencing this member here so that we don't run into NULL pointer excepti

[PATCH 4.9 43/47] sch_cbq: validate TCA_CBQ_WRROPT to avoid crash

2019-10-06 Thread Greg Kroah-Hartman
From: Eric Dumazet [ Upstream commit e9789c7cc182484fc031fd88097eb14cb26c4596 ] syzbot reported a crash in cbq_normalize_quanta() caused by an out of range cl->priority. iproute2 enforces this check, but malicious users do not. kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by N

[PATCH 4.14 22/68] drm/amdgpu/si: fix ASIC tests

2019-10-06 Thread Greg Kroah-Hartman
From: Jean Delvare [ Upstream commit 77efe48a729588527afb4d5811b9e0acb29f5e51 ] Comparing adev->family with CHIP constants is not correct. adev->family can only be compared with AMDGPU_FAMILY constants and adev->asic_type is the struct member to compare with CHIP constants. They are separate ide

[PATCH 4.14 15/68] powerpc/xmon: Check for HV mode when dumping XIVE info from OPAL

2019-10-06 Thread Greg Kroah-Hartman
From: Cédric Le Goater [ Upstream commit c3e0dbd7f780a58c4695f1cd8fc8afde80376737 ] Currently, the xmon 'dx' command calls OPAL to dump the XIVE state in the OPAL logs and also outputs some of the fields of the internal XIVE structures in Linux. The OPAL calls can only be done on baremetal (Powe

[PATCH 4.9 38/47] nfc: fix memory leak in llcp_sock_bind()

2019-10-06 Thread Greg Kroah-Hartman
From: Eric Dumazet [ Upstream commit a0c2dc1fe63e2869b74c1c7f6a81d1745c8a695d ] sysbot reported a memory leak after a bind() has failed. While we are at it, abort the operation if kmemdup() has failed. BUG: memory leak unreferenced object 0x888105d83ec0 (size 32): comm "syz-executor067",

[PATCH 4.14 17/68] powerpc/futex: Fix warning: oldval may be used uninitialized in this function

2019-10-06 Thread Greg Kroah-Hartman
From: Christophe Leroy [ Upstream commit 38a0d0cdb46d3f91534e5b9839ec2d67be14c59d ] We see warnings such as: kernel/futex.c: In function 'do_futex': kernel/futex.c:1676:17: warning: 'oldval' may be used uninitialized in this function [-Wmaybe-uninitialized] return oldval == cmparg;

[PATCH 4.9 40/47] sch_dsmark: fix potential NULL deref in dsmark_init()

2019-10-06 Thread Greg Kroah-Hartman
From: Eric Dumazet [ Upstream commit 474f0813a3002cb299bb73a5a93aa1f537a80ca8 ] Make sure TCA_DSMARK_INDICES was provided by the user. syzbot reported : kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: [#1] PRE

[PATCH 4.9 45/47] Smack: Dont ignore other bprm->unsafe flags if LSM_UNSAFE_PTRACE is set

2019-10-06 Thread Greg Kroah-Hartman
From: Jann Horn commit 3675f052b43ba51b99b85b073c7070e083f3e6fb upstream. There is a logic bug in the current smack_bprm_set_creds(): If LSM_UNSAFE_PTRACE is set, but the ptrace state is deemed to be acceptable (e.g. because the ptracer detached in the meantime), the other ->unsafe flags aren't

[PATCH 4.14 12/68] clk: sunxi-ng: v3s: add missing clock slices for MMC2 module clocks

2019-10-06 Thread Greg Kroah-Hartman
From: Icenowy Zheng [ Upstream commit 720099603d1f62e37b789366d7e89824b009ca28 ] The MMC2 clock slices are currently not defined in V3s CCU driver, which makes MMC2 not working. Fix this issue. Fixes: d0f11d14b0bc ("clk: sunxi-ng: add support for V3s CCU") Signed-off-by: Icenowy Zheng Signed-

[PATCH 4.9 00/47] 4.9.196-stable review

2019-10-06 Thread Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.9.196 release. There are 47 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 Tue 08 Oct 2019 05:19:59 PM UTC. Anything rec

[PATCH 4.14 20/68] vfio_pci: Restore original state on release

2019-10-06 Thread Greg Kroah-Hartman
From: hexin [ Upstream commit 92c8026854c25093946e0d7fe536fd9eac440f06 ] vfio_pci_enable() saves the device's initial configuration information with the intent that it is restored in vfio_pci_disable(). However, the commit referenced in Fixes: below replaced the call to __pci_reset_function_loc

[PATCH 4.14 16/68] powerpc/rtas: use device model APIs and serialization during LPM

2019-10-06 Thread Greg Kroah-Hartman
From: Nathan Lynch [ Upstream commit a6717c01ddc259f6f73364779df058e2c67309f8 ] The LPAR migration implementation and userspace-initiated cpu hotplug can interleave their executions like so: 1. Set cpu 7 offline via sysfs. 2. Begin a partition migration, whose implementation requires the OS

[PATCH 4.9 36/47] net: qlogic: Fix memory leak in ql_alloc_large_buffers

2019-10-06 Thread Greg Kroah-Hartman
From: Navid Emamdoost [ Upstream commit 1acb8f2a7a9f10543868ddd737e37424d5c36cf4 ] In ql_alloc_large_buffers, a new skb is allocated via netdev_alloc_skb. This skb should be released if pci_dma_mapping_error fails. Fixes: 0f8ab89e825f ("qla3xxx: Check return code from pci_map_single() in ql_re

[PATCH 4.9 08/47] powerpc/rtas: use device model APIs and serialization during LPM

2019-10-06 Thread Greg Kroah-Hartman
From: Nathan Lynch [ Upstream commit a6717c01ddc259f6f73364779df058e2c67309f8 ] The LPAR migration implementation and userspace-initiated cpu hotplug can interleave their executions like so: 1. Set cpu 7 offline via sysfs. 2. Begin a partition migration, whose implementation requires the OS

[PATCH 4.9 10/47] powerpc/pseries/mobility: use cond_resched when updating device tree

2019-10-06 Thread Greg Kroah-Hartman
From: Nathan Lynch [ Upstream commit ccfb5bd71d3d1228090a8633800ae7cdf42a94ac ] After a partition migration, pseries_devicetree_update() processes changes to the device tree communicated from the platform to Linux. This is a relatively heavyweight operation, with multiple device tree searches, m

[PATCH 4.9 32/47] cxgb4:Fix out-of-bounds MSI-X info array access

2019-10-06 Thread Greg Kroah-Hartman
From: Vishal Kulkarni [ Upstream commit 6b517374f4ea5a3c6e307e1219ec5f35d42e6d00 ] When fetching free MSI-X vectors for ULDs, check for the error code before accessing MSI-X info array. Otherwise, an out-of-bounds access is attempted, which results in kernel panic. Fixes: 94cdb8bb993a ("cxgb4:

[PATCH 4.9 35/47] net: ipv4: avoid mixed n_redirects and rate_tokens usage

2019-10-06 Thread Greg Kroah-Hartman
From: Paolo Abeni [ Upstream commit b406472b5ad79ede8d10077f0c8f05505ace8b6d ] Since commit c09551c6ff7f ("net: ipv4: use a dedicated counter for icmp_v4 redirect packets") we use 'n_redirects' to account for redirect packets, but we still use 'rate_tokens' to compute the redirect packets expone

[PATCH 4.9 12/47] vfio_pci: Restore original state on release

2019-10-06 Thread Greg Kroah-Hartman
From: hexin [ Upstream commit 92c8026854c25093946e0d7fe536fd9eac440f06 ] vfio_pci_enable() saves the device's initial configuration information with the intent that it is restored in vfio_pci_disable(). However, the commit referenced in Fixes: below replaced the call to __pci_reset_function_loc

[PATCH 4.9 14/47] powerpc/64s/exception: machine check use correct cfar for late handler

2019-10-06 Thread Greg Kroah-Hartman
From: Nicholas Piggin [ Upstream commit 0b66370c61fcf5fcc1d6901013e110284da6e2bb ] Bare metal machine checks run an "early" handler in real mode before running the main handler which reports the event. The main handler runs exactly as a normal interrupt handler, after the "windup" which sets re

[PATCH 4.9 17/47] clk: at91: select parent if main oscillator or bypass is enabled

2019-10-06 Thread Greg Kroah-Hartman
From: Eugen Hristev [ Upstream commit 69a6bcde7fd3fe6f3268ce26f31d9d9378384c98 ] Selecting the right parent for the main clock is done using only main oscillator enabled bit. In case we have this oscillator bypassed by an external signal (no driving on the XOUT line), we still use external clock

[PATCH 4.9 21/47] PCI: tegra: Fix OF node reference leak

2019-10-06 Thread Greg Kroah-Hartman
From: Nishka Dasgupta [ Upstream commit 9e38e690ace3e7a22a81fc02652fc101efb340cf ] Each iteration of for_each_child_of_node() executes of_node_put() on the previous node, but in some return paths in the middle of the loop of_node_put() is missing thus causing a reference leak. Hence stash these

[PATCH 4.9 19/47] MIPS: tlbex: Explicitly cast _PAGE_NO_EXEC to a boolean

2019-10-06 Thread Greg Kroah-Hartman
From: Nathan Chancellor [ Upstream commit c59ae0a1055127dd3828a88e111a0db59b254104 ] clang warns: arch/mips/mm/tlbex.c:634:19: error: use of logical '&&' with constant operand [-Werror,-Wconstant-logical-operand] if (cpu_has_rixi && _PAGE_NO_EXEC) { ^ ~

[PATCH 4.9 24/47] security: smack: Fix possible null-pointer dereferences in smack_socket_sock_rcv_skb()

2019-10-06 Thread Greg Kroah-Hartman
From: Jia-Ju Bai [ Upstream commit 3f4287e7d98a2954f20bf96c567fdffcd2b63eb9 ] In smack_socket_sock_rcv_skb(), there is an if statement on line 3920 to check whether skb is NULL: if (skb && skb->secmark != 0) This check indicates skb can be NULL in some cases. But on lines 3931 and 3932, sk

[PATCH 4.9 30/47] ANDROID: binder: remove waitqueue when thread exits.

2019-10-06 Thread Greg Kroah-Hartman
From: Martijn Coenen commit f5cb779ba16334b45ba8946d6bfa6d9834d1527f upstream. binder_poll() passes the thread->wait waitqueue that can be slept on for work. When a thread that uses epoll explicitly exits using BINDER_THREAD_EXIT, the waitqueue is freed, but it is never removed from the correspo

[PATCH 4.9 15/47] powerpc/pseries: correctly track irq state in default idle

2019-10-06 Thread Greg Kroah-Hartman
From: Nathan Lynch [ Upstream commit 92c94dfb69e350471473fd3075c74bc68150879e ] prep_irq_for_idle() is intended to be called before entering H_CEDE (and it is used by the pseries cpuidle driver). However the default pseries idle routine does not call it, leading to mismanaged lazy irq state when

[PATCH 4.9 05/47] ipmi_si: Only schedule continuously in the thread in maintenance mode

2019-10-06 Thread Greg Kroah-Hartman
From: Corey Minyard [ Upstream commit 340ff31ab00bca5c15915e70ad9ada3030c98cf8 ] ipmi_thread() uses back-to-back schedule() to poll for command completion which, on some machines, can push up CPU consumption and heavily tax the scheduler locks leading to noticeable overall performance degradatio

[PATCH 4.9 07/47] clk: sirf: Dont reference clk_init_data after registration

2019-10-06 Thread Greg Kroah-Hartman
From: Stephen Boyd [ Upstream commit af55dadfbce35b4f4c6247244ce3e44b2e242b84 ] A future patch is going to change semantics of clk_register() so that clk_hw::init is guaranteed to be NULL after a clk is registered. Avoid referencing this member here so that we don't run into NULL pointer excepti

[PATCH 4.9 29/47] kmemleak: increase DEBUG_KMEMLEAK_EARLY_LOG_SIZE default to 16K

2019-10-06 Thread Greg Kroah-Hartman
From: Nicolas Boichat [ Upstream commit b751c52bb587ae66f773b15204ef7a147467f4c7 ] The current default value (400) is too low on many systems (e.g. some ARM64 platform takes up 1000+ entries). syzbot uses 16000 as default value, and has proved to be enough on beefy configurations, so let's pic

[PATCH 4.9 23/47] HID: apple: Fix stuck function keys when using FN

2019-10-06 Thread Greg Kroah-Hartman
From: Joao Moreno [ Upstream commit aec256d0ecd561036f188dbc8fa7924c47a9edfd ] This fixes an issue in which key down events for function keys would be repeatedly emitted even after the user has raised the physical key. For example, the driver fails to emit the F5 key up event when going through

[PATCH 4.9 26/47] fat: work around race with userspaces read via blockdev while mounting

2019-10-06 Thread Greg Kroah-Hartman
From: OGAWA Hirofumi [ Upstream commit 07bfa4415ab607e459b69bd86aa7e7602ce10b4f ] If userspace reads the buffer via blockdev while mounting, sb_getblk()+modify can race with buffer read via blockdev. For example, FS userspace bh = sb_getblk() m

[PATCH 4.9 18/47] scsi: core: Reduce memory required for SCSI logging

2019-10-06 Thread Greg Kroah-Hartman
From: Bart Van Assche [ Upstream commit dccc96abfb21dc19d69e707c38c8ba439bba7160 ] The data structure used for log messages is so large that it can cause a boot failure. Since allocations from that data structure can fail anyway, use kmalloc() / kfree() instead of that data structure. See also

[PATCH 4.9 04/47] gpu: drm: radeon: Fix a possible null-pointer dereference in radeon_connector_set_property()

2019-10-06 Thread Greg Kroah-Hartman
From: Jia-Ju Bai [ Upstream commit f3eb9b8f67bc28783eddc142ad805ebdc53d6339 ] In radeon_connector_set_property(), there is an if statement on line 743 to check whether connector->encoder is NULL: if (connector->encoder) When connector->encoder is NULL, it is used on line 755: if (connec

[PATCH 4.9 20/47] mfd: intel-lpss: Remove D3cold delay

2019-10-06 Thread Greg Kroah-Hartman
From: Kai-Heng Feng [ Upstream commit 76380a607ba0b28627c9b4b55cd47a079a59624b ] Goodix touchpad may drop its first couple input events when i2c-designware-platdrv and intel-lpss it connects to took too long to runtime resume from runtime suspended state. This issue happens becuase the touchpad

[PATCH 4.9 25/47] ARM: 8903/1: ensure that usable memory in bank 0 starts from a PMD-aligned address

2019-10-06 Thread Greg Kroah-Hartman
From: Mike Rapoport [ Upstream commit 00d2ec1e6bd82c0538e6dd3e4a4040de93ba4fef ] The calculation of memblock_limit in adjust_lowmem_bounds() assumes that bank 0 starts from a PMD-aligned address. However, the beginning of the first bank may be NOMAP memory and the start of usable memory will be

[PATCH 4.9 16/47] arm64: fix unreachable code issue with cmpxchg

2019-10-06 Thread Greg Kroah-Hartman
From: Arnd Bergmann [ Upstream commit 920fdab7b3ce98c14c840261e364f490f3679a62 ] On arm64 build with clang, sometimes the __cmpxchg_mb is not inlined when CONFIG_OPTIMIZE_INLINING is set. Clang then fails a compile-time assertion, because it cannot tell at compile time what the size of the argum

[PATCH 4.9 27/47] hypfs: Fix error number left in struct pointer member

2019-10-06 Thread Greg Kroah-Hartman
From: David Howells [ Upstream commit b54c64f7adeb241423cd46598f458b5486b0375e ] In hypfs_fill_super(), if hypfs_create_update_file() fails, sbi->update_file is left holding an error number. This is passed to hypfs_kill_super() which doesn't check for this. Fix this by not setting sbi->update_

[PATCH 4.9 22/47] ARM: 8898/1: mm: Dont treat faults reported from cache maintenance as writes

2019-10-06 Thread Greg Kroah-Hartman
From: Will Deacon [ Upstream commit 834020366da9ab3fb87d1eb9a3160eb22dbed63a ] Translation faults arising from cache maintenance instructions are rather unhelpfully reported with an FSR value where the WnR field is set to 1, indicating that the faulting access was a write. Since cache maintenanc

[PATCH 4.9 02/47] video: ssd1307fb: Start page range at page_offset

2019-10-06 Thread Greg Kroah-Hartman
From: Marko Kohtala [ Upstream commit dd9782834dd9dde3624ff1acea8859f3d3e792d4 ] The page_offset was only applied to the end of the page range. This caused the display updates to cause a scrolling effect on the display because the amount of data written to the display did not match the range dis

[PATCH 4.9 11/47] pinctrl: tegra: Fix write barrier placement in pmx_writel

2019-10-06 Thread Greg Kroah-Hartman
From: Sowjanya Komatineni [ Upstream commit c2cf351eba2ff6002ce8eb178452219d2521e38e ] pmx_writel uses writel which inserts write barrier before the register write. This patch has fix to replace writel with writel_relaxed followed by a readback and memory barrier to ensure write operation is co

[PATCH 4.9 13/47] drm/amdgpu/si: fix ASIC tests

2019-10-06 Thread Greg Kroah-Hartman
From: Jean Delvare [ Upstream commit 77efe48a729588527afb4d5811b9e0acb29f5e51 ] Comparing adev->family with CHIP constants is not correct. adev->family can only be compared with AMDGPU_FAMILY constants and adev->asic_type is the struct member to compare with CHIP constants. They are separate ide

[PATCH 4.9 06/47] clk: qoriq: Fix -Wunused-const-variable

2019-10-06 Thread Greg Kroah-Hartman
From: Nathan Huckleberry [ Upstream commit a95fb581b144b5e73da382eaedb2e32027610597 ] drivers/clk/clk-qoriq.c:138:38: warning: unused variable 'p5020_cmux_grp1' [-Wunused-const-variable] static const struct clockgen_muxinfo p5020_cmux_grp1 drivers/clk/clk-qoriq.c:146:38: warning: unused variabl

[PATCH 4.9 33/47] hso: fix NULL-deref on tty open

2019-10-06 Thread Greg Kroah-Hartman
From: Johan Hovold [ Upstream commit 8353da9fa69722b54cba82b2ec740afd3d438748 ] Fix NULL-pointer dereference on tty open due to a failure to handle a missing interrupt-in endpoint when probing modem ports: BUG: kernel NULL pointer dereference, address: 0006 ...

[PATCH 4.9 03/47] drm/radeon: Fix EEH during kexec

2019-10-06 Thread Greg Kroah-Hartman
From: KyleMahlkuch [ Upstream commit 6f7fe9a93e6c09bf988c5059403f5f88e17e21e6 ] During kexec some adapters hit an EEH since they are not properly shut down in the radeon_pci_shutdown() function. Adding radeon_suspend_kms() fixes this issue. Signed-off-by: KyleMahlkuch Signed-off-by: Alex Deuch

[PATCH 4.4 12/36] powerpc/64s/exception: machine check use correct cfar for late handler

2019-10-06 Thread Greg Kroah-Hartman
From: Nicholas Piggin [ Upstream commit 0b66370c61fcf5fcc1d6901013e110284da6e2bb ] Bare metal machine checks run an "early" handler in real mode before running the main handler which reports the event. The main handler runs exactly as a normal interrupt handler, after the "windup" which sets re

[PATCH 4.4 15/36] mfd: intel-lpss: Remove D3cold delay

2019-10-06 Thread Greg Kroah-Hartman
From: Kai-Heng Feng [ Upstream commit 76380a607ba0b28627c9b4b55cd47a079a59624b ] Goodix touchpad may drop its first couple input events when i2c-designware-platdrv and intel-lpss it connects to took too long to runtime resume from runtime suspended state. This issue happens becuase the touchpad

[PATCH 4.4 00/36] 4.4.196-stable review

2019-10-06 Thread Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.4.196 release. There are 36 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 Tue 08 Oct 2019 05:07:10 PM UTC. Anything rec

[PATCH 4.4 26/36] ipv6: drop incoming packets having a v4mapped source address

2019-10-06 Thread Greg Kroah-Hartman
From: Eric Dumazet [ Upstream commit 6af1799aaf3f1bc8defedddfa00df3192445bbf3 ] This began with a syzbot report. syzkaller was injecting IPv6 TCP SYN packets having a v4mapped source address. After an unsuccessful 4-tuple lookup, TCP creates a request socket (SYN_RECV) and calls reqsk_queue_has

[PATCH 4.4 09/36] pinctrl: tegra: Fix write barrier placement in pmx_writel

2019-10-06 Thread Greg Kroah-Hartman
From: Sowjanya Komatineni [ Upstream commit c2cf351eba2ff6002ce8eb178452219d2521e38e ] pmx_writel uses writel which inserts write barrier before the register write. This patch has fix to replace writel with writel_relaxed followed by a readback and memory barrier to ensure write operation is co

[PATCH 4.4 27/36] net: ipv4: avoid mixed n_redirects and rate_tokens usage

2019-10-06 Thread Greg Kroah-Hartman
From: Paolo Abeni [ Upstream commit b406472b5ad79ede8d10077f0c8f05505ace8b6d ] Since commit c09551c6ff7f ("net: ipv4: use a dedicated counter for icmp_v4 redirect packets") we use 'n_redirects' to account for redirect packets, but we still use 'rate_tokens' to compute the redirect packets expone

[PATCH 4.4 06/36] powerpc/rtas: use device model APIs and serialization during LPM

2019-10-06 Thread Greg Kroah-Hartman
From: Nathan Lynch [ Upstream commit a6717c01ddc259f6f73364779df058e2c67309f8 ] The LPAR migration implementation and userspace-initiated cpu hotplug can interleave their executions like so: 1. Set cpu 7 offline via sysfs. 2. Begin a partition migration, whose implementation requires the OS

[PATCH 4.4 08/36] powerpc/pseries/mobility: use cond_resched when updating device tree

2019-10-06 Thread Greg Kroah-Hartman
From: Nathan Lynch [ Upstream commit ccfb5bd71d3d1228090a8633800ae7cdf42a94ac ] After a partition migration, pseries_devicetree_update() processes changes to the device tree communicated from the platform to Linux. This is a relatively heavyweight operation, with multiple device tree searches, m

[PATCH 4.4 31/36] xen-netfront: do not use ~0U as error return value for xennet_fill_frags()

2019-10-06 Thread Greg Kroah-Hartman
From: Dongli Zhang [ Upstream commit a761129e3625688310aecf26e1be9e98e85f8eb5 ] xennet_fill_frags() uses ~0U as return value when the sk_buff is not able to cache extra fragments. This is incorrect because the return type of xennet_fill_frags() is RING_IDX and 0x is an expected value for

[PATCH 4.4 04/36] clk: qoriq: Fix -Wunused-const-variable

2019-10-06 Thread Greg Kroah-Hartman
From: Nathan Huckleberry [ Upstream commit a95fb581b144b5e73da382eaedb2e32027610597 ] drivers/clk/clk-qoriq.c:138:38: warning: unused variable 'p5020_cmux_grp1' [-Wunused-const-variable] static const struct clockgen_muxinfo p5020_cmux_grp1 drivers/clk/clk-qoriq.c:146:38: warning: unused variabl

[PATCH 4.4 05/36] clk: sirf: Dont reference clk_init_data after registration

2019-10-06 Thread Greg Kroah-Hartman
From: Stephen Boyd [ Upstream commit af55dadfbce35b4f4c6247244ce3e44b2e242b84 ] A future patch is going to change semantics of clk_register() so that clk_hw::init is guaranteed to be NULL after a clk is registered. Avoid referencing this member here so that we don't run into NULL pointer excepti

[PATCH 4.4 07/36] powerpc/futex: Fix warning: oldval may be used uninitialized in this function

2019-10-06 Thread Greg Kroah-Hartman
From: Christophe Leroy [ Upstream commit 38a0d0cdb46d3f91534e5b9839ec2d67be14c59d ] We see warnings such as: kernel/futex.c: In function 'do_futex': kernel/futex.c:1676:17: warning: 'oldval' may be used uninitialized in this function [-Wmaybe-uninitialized] return oldval == cmparg;

[PATCH 4.4 29/36] nfc: fix memory leak in llcp_sock_bind()

2019-10-06 Thread Greg Kroah-Hartman
From: Eric Dumazet [ Upstream commit a0c2dc1fe63e2869b74c1c7f6a81d1745c8a695d ] sysbot reported a memory leak after a bind() has failed. While we are at it, abort the operation if kmemdup() has failed. BUG: memory leak unreferenced object 0x888105d83ec0 (size 32): comm "syz-executor067",

[PATCH 4.4 34/36] Smack: Dont ignore other bprm->unsafe flags if LSM_UNSAFE_PTRACE is set

2019-10-06 Thread Greg Kroah-Hartman
From: Jann Horn commit 3675f052b43ba51b99b85b073c7070e083f3e6fb upstream. There is a logic bug in the current smack_bprm_set_creds(): If LSM_UNSAFE_PTRACE is set, but the ptrace state is deemed to be acceptable (e.g. because the ptracer detached in the meantime), the other ->unsafe flags aren't

[PATCH 4.4 03/36] ipmi_si: Only schedule continuously in the thread in maintenance mode

2019-10-06 Thread Greg Kroah-Hartman
From: Corey Minyard [ Upstream commit 340ff31ab00bca5c15915e70ad9ada3030c98cf8 ] ipmi_thread() uses back-to-back schedule() to poll for command completion which, on some machines, can push up CPU consumption and heavily tax the scheduler locks leading to noticeable overall performance degradatio

[PATCH 4.4 28/36] net: qlogic: Fix memory leak in ql_alloc_large_buffers

2019-10-06 Thread Greg Kroah-Hartman
From: Navid Emamdoost [ Upstream commit 1acb8f2a7a9f10543868ddd737e37424d5c36cf4 ] In ql_alloc_large_buffers, a new skb is allocated via netdev_alloc_skb. This skb should be released if pci_dma_mapping_error fails. Fixes: 0f8ab89e825f ("qla3xxx: Check return code from pci_map_single() in ql_re

[PATCH 4.4 20/36] hypfs: Fix error number left in struct pointer member

2019-10-06 Thread Greg Kroah-Hartman
From: David Howells [ Upstream commit b54c64f7adeb241423cd46598f458b5486b0375e ] In hypfs_fill_super(), if hypfs_create_update_file() fails, sbi->update_file is left holding an error number. This is passed to hypfs_kill_super() which doesn't check for this. Fix this by not setting sbi->update_

[PATCH 4.4 02/36] gpu: drm: radeon: Fix a possible null-pointer dereference in radeon_connector_set_property()

2019-10-06 Thread Greg Kroah-Hartman
From: Jia-Ju Bai [ Upstream commit f3eb9b8f67bc28783eddc142ad805ebdc53d6339 ] In radeon_connector_set_property(), there is an if statement on line 743 to check whether connector->encoder is NULL: if (connector->encoder) When connector->encoder is NULL, it is used on line 755: if (connec

[PATCH 4.4 35/36] smack: use GFP_NOFS while holding inode_smack::smk_lock

2019-10-06 Thread Greg Kroah-Hartman
From: Eric Biggers commit e5bfad3d7acc5702f32aafeb388362994f4d7bd0 upstream. inode_smack::smk_lock is taken during smack_d_instantiate(), which is called during a filesystem transaction when creating a file on ext4. Therefore to avoid a deadlock, all code that takes this lock must use GFP_NOFS,

[PATCH 4.4 36/36] NFC: fix attrs checks in netlink interface

2019-10-06 Thread Greg Kroah-Hartman
From: Andrey Konovalov commit 18917d51472fe3b126a3a8f756c6b18085eb8130 upstream. nfc_genl_deactivate_target() relies on the NFC_ATTR_TARGET_INDEX attribute being present, but doesn't check whether it is actually provided by the user. Same goes for nfc_genl_fw_download() and NFC_ATTR_FIRMWARE_NAM

<    2   3   4   5   6   7   8   9   10   >