[PATCH 4.19 038/106] 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.19 068/106] pktcdvd: remove warning on attempting to register non-passthrough dev

2019-10-06 Thread Greg Kroah-Hartman
From: Jens Axboe [ Upstream commit eb09b3cc464d2c3bbde9a6648603c8d599ea8582 ] Anatoly reports that he gets the below warning when booting -git on a sparc64 box on debian unstable: ... [ 13.352975] aes_sparc64: Using sparc64 aes opcodes optimized AES implementation [ 13.428002] [

[PATCH 4.19 100/106] soundwire: Kconfig: fix help format

2019-10-06 Thread Greg Kroah-Hartman
From: Pierre-Louis Bossart [ Upstream commit 9d7cd9d500826a14fc68fb6994db375432866c6a ] Move to the regular help format, --help-- is no longer recommended. Reviewed-by: Takashi Iwai Signed-off-by: Pierre-Louis Bossart Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers

[PATCH 4.19 095/106] udp: only do GSO if # of segs > 1

2019-10-06 Thread Greg Kroah-Hartman
From: Josh Hunt [ Upstream commit 4094871db1d65810acab3d57f6089aa39ef7f648 ] Prior to this change an application sending <= 1MSS worth of data and enabling UDP GSO would fail if the system had SW GSO enabled, but the same send would succeed if HW GSO offload is enabled. In addition to this incon

[PATCH 4.19 092/106] udp: fix gso_segs calculations

2019-10-06 Thread Greg Kroah-Hartman
From: Josh Hunt [ Upstream commit 44b321e5020d782ad6e8ae8183f09b163be6e6e2 ] Commit dfec0ee22c0a ("udp: Record gso_segs when supporting UDP segmentation offload") added gso_segs calculation, but incorrectly got sizeof() the pointer and not the underlying data type. In addition let's fix the v6

[PATCH 4.19 073/106] 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.19 079/106] bpf: fix use after free in prog symbol exposure

2019-10-06 Thread Greg Kroah-Hartman
From: Daniel Borkmann commit c751798aa224fadc5124b49eeb38fb468c0fa039 upstream. syzkaller managed to trigger the warning in bpf_jit_free() which checks via bpf_prog_kallsyms_verify_off() for potentially unlinked JITed BPF progs in kallsyms, and subsequently trips over GPF when walking kallsyms e

[PATCH 4.19 074/106] arm64: consider stack randomization for mmap base only when necessary

2019-10-06 Thread Greg Kroah-Hartman
From: Alexandre Ghiti [ Upstream commit e8d54b62c55ab6201de6d195fc2c276294c1f6ae ] Do not offset mmap base address because of stack randomization if current task does not want randomization. Note that x86 already implements this behaviour. Link: http://lkml.kernel.org/r/20190730055113.23635-4-

[PATCH 4.19 076/106] arm: properly account for stack randomization and stack guard gap

2019-10-06 Thread Greg Kroah-Hartman
From: Alexandre Ghiti [ Upstream commit af0f4297286f13a75edf93677b1fb2fc16c412a7 ] This commit takes care of stack randomization and stack guard gap when computing mmap base address and checks if the task asked for randomization. This fixes the problem uncovered and not fixed for arm here: http

[PATCH 4.19 044/106] clk: sprd: add missing kfree

2019-10-06 Thread Greg Kroah-Hartman
From: Chunyan Zhang [ Upstream commit 5e75ea9c67433a065b0e8595ad3c91c7c0ca0d2d ] The number of config registers for different pll clocks probably are not same, so we have to use malloc, and should free the memory before return. Fixes: 3e37b005580b ("clk: sprd: add adjustable pll support") Signe

[PATCH 4.19 041/106] 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.19 071/106] 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 069/106] 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.19 096/106] 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.19 084/106] 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 5.2 017/137] 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 5.3 014/166] drm/bridge: sii902x: fix missing reference to mclk clock

2019-10-06 Thread Greg Kroah-Hartman
From: Olivier Moysan [ Upstream commit 365d28c92f8cd3d3860f8dd057a8c136e24b3698 ] Add devm_clk_get call to retrieve reference to master clock. Fixes: ff5781634c41 ("drm/bridge: sii902x: Implement HDMI audio support") Signed-off-by: Olivier Moysan Reviewed-by: Jyri Sarha Acked-by: Andrzej Haj

[PATCH 5.2 016/137] udp: fix gso_segs calculations

2019-10-06 Thread Greg Kroah-Hartman
From: Josh Hunt [ Upstream commit 44b321e5020d782ad6e8ae8183f09b163be6e6e2 ] Commit dfec0ee22c0a ("udp: Record gso_segs when supporting UDP segmentation offload") added gso_segs calculation, but incorrectly got sizeof() the pointer and not the underlying data type. In addition let's fix the v6

[PATCH 5.2 002/137] 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 5.2 018/137] net: dsa: rtl8366: Check VLAN ID and not ports

2019-10-06 Thread Greg Kroah-Hartman
From: Linus Walleij [ Upstream commit e8521e53cca584ddf8ec4584d3c550a6c65f88c4 ] There has been some confusion between the port number and the VLAN ID in this driver. What we need to check for validity is the VLAN ID, nothing else. The current confusion came from assigning a few default VLANs f

[PATCH 5.2 022/137] 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 5.2 021/137] 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 5.2 024/137] net: sched: cbs: Avoid division by zero when calculating the port rate

2019-10-06 Thread Greg Kroah-Hartman
From: Vladimir Oltean [ Upstream commit 83c8c3cf45163f0c823db37be6ab04dfcf8ac751 ] As explained in the "net: sched: taprio: Avoid division by zero on invalid link speed" commit, it is legal for the ethtool API to return zero as a link speed. So guard against it to ensure we don't perform a divis

[PATCH 5.2 030/137] drm/amd/display: add monitor patch to add T7 delay

2019-10-06 Thread Greg Kroah-Hartman
From: Anthony Koo [ Upstream commit 88eac241a1fc500ce5274a09ddc4bd5fc2b5adb6 ] [Why] Specifically to one panel, TCON is able to accept active video signal quickly, but the Source Driver requires 2-3 frames of extra time. It is a Panel issue since TCON needs to take care of all Sink requirements

[PATCH 5.2 005/137] 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 5.2 008/137] net: sched: taprio: Fix potential integer overflow in taprio_set_picos_per_byte

2019-10-06 Thread Greg Kroah-Hartman
From: Vladimir Oltean [ Upstream commit 68ce6688a5baefde30914fc07fc27292dbbe8320 ] The speed divisor is used in a context expecting an s64, but it is evaluated using 32-bit arithmetic. To avoid that happening, instead of multiplying by 1,000,000 in the first place, simplify the fraction and do

[PATCH 5.2 052/137] clk: sprd: Dont reference clk_init_data after registration

2019-10-06 Thread Greg Kroah-Hartman
From: Stephen Boyd [ Upstream commit f6c90df8e7e33c3dc33d4d7471bc42c232b0510e ] 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 5.2 007/137] 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 5.2 035/137] drm/rockchip: Check for fast link training before enabling psr

2019-10-06 Thread Greg Kroah-Hartman
From: Sean Paul [ Upstream commit ad309284a52be47c8b3126c9376358bf381861bc ] Once we start shutting off the link during PSR, we're going to want fast training to work. If the display doesn't support fast training, don't enable psr. Changes in v2: - None Changes in v3: - None Changes in v4: - No

[PATCH 5.2 034/137] drm/panel: check failure cases in the probe func

2019-10-06 Thread Greg Kroah-Hartman
From: Navid Emamdoost [ Upstream commit afd6d4f5a52c16e1483328ac074abb1cde92c29f ] The following function calls may fail and return NULL, so the null check is added. of_graph_get_next_endpoint of_graph_get_remote_port_parent of_graph_get_remote_port Update: Thanks to Sam Ravnborg, for suggessio

[PATCH 5.2 053/137] 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 5.2 031/137] 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 5.2 038/137] 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 5.2 058/137] 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 5.2 066/137] clk: renesas: mstp: Set GENPD_FLAG_ALWAYS_ON for clock domain

2019-10-06 Thread Greg Kroah-Hartman
From: Geert Uytterhoeven [ Upstream commit a459a184c978ca9ad538aab93aafdde873953f30 ] The CPG/MSTP Clock Domain driver does not implement the generic_pm_domain.power_{on,off}() callbacks, as the domain itself cannot be powered down. Hence the domain should be marked as always-on by setting the

[PATCH 5.2 070/137] 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 5.2 071/137] 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 5.3 164/166] KVM: hyperv: Fix Direct Synthetic timers assert an interrupt w/o lapic_in_kernel

2019-10-06 Thread Greg Kroah-Hartman
From: Wanpeng Li commit a073d7e3ad687a7ef32b65affe80faa7ce89bf92 upstream. Reported by syzkaller: kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: [#1] PREEMPT SMP KASAN RIP: 0010:__apic_accept_irq+0x46/0x740 arch/x86/kvm/

[PATCH 5.3 165/166] 9p/cache.c: Fix memory leak in v9fs_cache_session_get_cookie

2019-10-06 Thread Greg Kroah-Hartman
From: Bharath Vedartham commit 962a991c5de18452d6c429d99f3039387cf5cbb0 upstream. v9fs_cache_session_get_cookie assigns a random cachetag to v9ses->cachetag, if the cachetag is not assigned previously. v9fs_random_cachetag allocates memory to v9ses->cachetag with kmalloc and uses scnprintf to f

[PATCH 5.2 069/137] selftests/powerpc: Retry on host facility unavailable

2019-10-06 Thread Greg Kroah-Hartman
From: Gustavo Romero [ Upstream commit 6652bf6408895b09d31fd4128a1589a1a0672823 ] TM test tm-unavailable must take into account aborts due to host aborting a transactin because of a facility unavailable exception, just like it already does for aborts on reschedules (TM_CAUSE_KVM_RESCHED). Repor

[PATCH 5.3 166/166] vfs: set fs_context::user_ns for reconfigure

2019-10-06 Thread Greg Kroah-Hartman
From: Eric Biggers commit 1dd9bc08cf1420d466dd8dcfcc233777e61ca5d2 upstream. fs_context::user_ns is used by fuse_parse_param(), even during remount, so it needs to be set to the existing value for reconfigure. Reproducer: #include #include int main() {

[PATCH 5.3 132/166] 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 5.3 160/166] dm raid: fix updating of max_discard_sectors limit

2019-10-06 Thread Greg Kroah-Hartman
From: Ming Lei commit c8156fc77d0796ba2618936dbb3084e769e916c1 upstream. Unit of 'chunk_size' is byte, instead of sector, so fix it by setting the queue_limits' max_discard_sectors to rs->md.chunk_sectors. Also, rename chunk_size to chunk_size_bytes. Without this fix, too big max_discard_secto

[PATCH 5.3 161/166] dm zoned: fix invalid memory access

2019-10-06 Thread Greg Kroah-Hartman
From: Mikulas Patocka commit 0c8e9c2d668278652af028c3cc068c65f66342f4 upstream. Commit 75d66ffb48efb30f2dd42f041ba8b39c5b2bd115 ("dm zoned: properly handle backing device failure") triggers a coverity warning: --- drivers/md/dm-zoned-target.c |2 -- 1 file changed, 2 deletions(-) --- a/dr

[PATCH 5.3 162/166] 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 5.3 163/166] kexec: bail out upon SIGKILL when allocating memory.

2019-10-06 Thread Greg Kroah-Hartman
From: Tetsuo Handa commit 7c3a6aedcd6aae0a32a527e68669f7dd667492d1 upstream. syzbot found that a thread can stall for minutes inside kexec_load() after that thread was killed by SIGKILL [1]. It turned out that the reproducer was trying to allocate 2408MB of memory using kimage_alloc_page() from

[PATCH 5.3 136/166] 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 5.3 133/166] 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 5.3 158/166] 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 5.2 075/137] 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 5.3 137/166] 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 5.2 072/137] pstore: fs superblock limits

2019-10-06 Thread Greg Kroah-Hartman
From: Deepa Dinamani [ Upstream commit 83b8a3fbe3aa82ac3c253b698ae6a9be2dbdd5e0 ] Leaving granularity at 1ns because it is dependent on the specific attached backing pstore module. ramoops has microsecond resolution. Fix the readback of ramoops fractional timestamp microseconds, which has incor

[PATCH 5.3 134/166] 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 5.3 159/166] 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 5.3 128/166] 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 5.3 131/166] 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 5.3 135/166] net: sched: taprio: Fix potential integer overflow in taprio_set_picos_per_byte

2019-10-06 Thread Greg Kroah-Hartman
From: Vladimir Oltean [ Upstream commit 68ce6688a5baefde30914fc07fc27292dbbe8320 ] The speed divisor is used in a context expecting an s64, but it is evaluated using 32-bit arithmetic. To avoid that happening, instead of multiplying by 1,000,000 in the first place, simplify the fraction and do

[PATCH 5.2 049/137] clk: actions: Dont reference clk_init_data after registration

2019-10-06 Thread Greg Kroah-Hartman
From: Stephen Boyd [ Upstream commit cf9ec1fc6d7cceb73e7f1efd079d2eae173fdf57 ] 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 5.2 079/137] 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 5.2 078/137] 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 5.2 045/137] drm/amd/display: fix issue where 252-255 values are clipped

2019-10-06 Thread Greg Kroah-Hartman
From: Anthony Koo [ Upstream commit 1cbcfc975164f397b449efb17f59d81a703090db ] [Why] When endpoint is at the boundary of a region, such as at 2^0=1 we find that the last segment has a sharp slope and some points are clipped at the top. [How] If end point is 1, which is exactly at the 2^0 region

[PATCH 5.2 084/137] mbox: qcom: add APCS child device for QCS404

2019-10-06 Thread Greg Kroah-Hartman
From: Jorge Ramirez-Ortiz [ Upstream commit 78c86458a440ff356073c21b568cb58ddb67b82b ] There is clock controller functionality in the APCS hardware block of qcs404 devices similar to msm8916. Co-developed-by: Niklas Cassel Signed-off-by: Niklas Cassel Signed-off-by: Jorge Ramirez-Ortiz Revie

[PATCH 5.2 098/137] PCI: pci-hyperv: Fix build errors on non-SYSFS config

2019-10-06 Thread Greg Kroah-Hartman
From: Randy Dunlap [ Upstream commit f58ba5e3f6863ea4486952698898848a6db726c2 ] Fix build errors when building almost-allmodconfig but with SYSFS not set (not enabled). Fixes these build errors: ERROR: "pci_destroy_slot" [drivers/pci/controller/pci-hyperv.ko] undefined! ERROR: "pci_create_slot"

[PATCH 5.2 043/137] 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 5.2 093/137] i2c-cht-wc: Fix lockdep warning

2019-10-06 Thread Greg Kroah-Hartman
From: Hans de Goede [ Upstream commit 232219b9a464c2479c98aa589acb1bd3383ae9d6 ] When the kernel is build with lockdep support and the i2c-cht-wc driver is used, the following warning is shown: [ 66.674334] == [ 66.674337] WARNING: possibl

[PATCH 5.2 087/137] dma-buf/sw_sync: Synchronize signal vs syncpt free

2019-10-06 Thread Greg Kroah-Hartman
From: Chris Wilson [ Upstream commit d3c6dd1fb30d3853c2012549affe75c930f4a2f9 ] During release of the syncpt, we remove it from the list of syncpt and the tree, but only if it is not already been removed. However, during signaling, we first remove the syncpt from the list. So, if we concurrently

[PATCH 5.2 103/137] soundwire: intel: fix channel number reported by hardware

2019-10-06 Thread Greg Kroah-Hartman
From: Pierre-Louis Bossart [ Upstream commit 18046335643de6d21327f5ae034c8fb8463f6715 ] On all released Intel controllers (CNL/CML/ICL), PDI2 reports an invalid count, force the correct hardware-supported value This may have to be revisited with platform-specific values if the hardware changes,

[PATCH 5.2 109/137] 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 5.2 108/137] PCI: Add pci_info_ratelimited() to ratelimit PCI separately

2019-10-06 Thread Greg Kroah-Hartman
From: Krzysztof Wilczynski [ Upstream commit 7f1c62c443a453deb6eb3515e3c05650ffe0dcf0 ] Do not use printk_ratelimit() in drivers/pci/pci.c as it shares the rate limiting state with all other callers to the printk_ratelimit(). Add pci_info_ratelimited() (similar to pci_notice_ratelimited() added

[PATCH 5.2 113/137] PCI: exynos: Propagate errors for optional PHYs

2019-10-06 Thread Greg Kroah-Hartman
From: Thierry Reding [ Upstream commit ddd6960087d4b45759434146d681a94bbb1c54ad ] devm_of_phy_get() 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 devres structures. Propagating only -EPROBE_DEFER is pro

[PATCH 5.2 114/137] 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 5.2 121/137] crypto: hisilicon - Fix double free in sec_free_hw_sgl()

2019-10-06 Thread Greg Kroah-Hartman
From: Yunfeng Ye [ Upstream commit 24fbf7bad888767bed952f540ac963bc57e47e15 ] There are two problems in sec_free_hw_sgl(): First, when sgl_current->next is valid, @hw_sgl will be freed in the first loop, but it free again after the loop. Second, sgl_current and sgl_current->next_sgl is not mat

[PATCH 5.2 132/137] dm raid: fix updating of max_discard_sectors limit

2019-10-06 Thread Greg Kroah-Hartman
From: Ming Lei commit c8156fc77d0796ba2618936dbb3084e769e916c1 upstream. Unit of 'chunk_size' is byte, instead of sector, so fix it by setting the queue_limits' max_discard_sectors to rs->md.chunk_sectors. Also, rename chunk_size to chunk_size_bytes. Without this fix, too big max_discard_secto

[PATCH 5.3 130/166] 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 5.2 091/137] MIPS: Dont use bc_false uninitialized in __mm_isBranchInstr

2019-10-06 Thread Greg Kroah-Hartman
From: Nathan Chancellor [ Upstream commit c2869aafe7191d366d74c55cb8a93c6d0baba317 ] clang warns: arch/mips/kernel/branch.c:148:8: error: variable 'bc_false' is used uninitialized whenever switch case is taken [-Werror,-Wsometimes-uninitialized] case mm_bc2t_op:

[PATCH 5.3 154/166] net: dsa: sja1105: Prevent leaking memory

2019-10-06 Thread Greg Kroah-Hartman
From: Navid Emamdoost [ Upstream commit 68501df92d116b760777a2cfda314789f926476f ] In sja1105_static_config_upload, in two cases memory is leaked: when static_config_buf_prepare_for_upload fails and when sja1105_inhibit_tx fails. In both cases config_buf should be released. Fixes: 8aa9ebccae87

[PATCH 5.3 149/166] net: dsa: sja1105: Initialize the meta_lock

2019-10-06 Thread Greg Kroah-Hartman
From: Vladimir Oltean [ Upstream commit d6530e5ad45089c018c3cc5b5957a34721249f6f ] Otherwise, with CONFIG_DEBUG_SPINLOCK=y, this stack trace gets printed when enabling RX timestamping and receiving a PTP frame: [ 318.537078] INFO: trying to register non-static key. [ 318.542040] the code is f

[PATCH 5.2 126/137] mips: properly account for stack randomization and stack guard gap

2019-10-06 Thread Greg Kroah-Hartman
From: Alexandre Ghiti [ Upstream commit b1f61b5bde3a1f50392c97b4c8513d1b8efb1cf2 ] This commit takes care of stack randomization and stack guard gap when computing mmap base address and checks if the task asked for randomization. This fixes the problem uncovered and not fixed for arm here: http

[PATCH 5.2 134/137] kexec: bail out upon SIGKILL when allocating memory.

2019-10-06 Thread Greg Kroah-Hartman
From: Tetsuo Handa commit 7c3a6aedcd6aae0a32a527e68669f7dd667492d1 upstream. syzbot found that a thread can stall for minutes inside kexec_load() after that thread was killed by SIGKILL [1]. It turned out that the reproducer was trying to allocate 2408MB of memory using kimage_alloc_page() from

[PATCH 5.3 018/166] drm/amd/display: Use proper enum conversion functions

2019-10-06 Thread Greg Kroah-Hartman
From: Nathan Chancellor [ Upstream commit d196bbbc28fab82624f7686f8b0da8e8644b6e6a ] clang warns: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_pp_smu.c:336:8: warning: implicit conversion from enumeration type 'enum smu_clk_type' to different enumeration type 'enum amd_pp_clock_typ

[PATCH 5.3 144/166] 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 5.3 151/166] net: dsa: sja1105: Fix sleeping while atomic in .port_hwtstamp_set

2019-10-06 Thread Greg Kroah-Hartman
From: Vladimir Oltean [ Upstream commit 3e8db7e56082156a37b71d7334860c10fcea8025 ] Currently this stack trace can be seen with CONFIG_DEBUG_ATOMIC_SLEEP=y: [ 41.568348] BUG: sleeping function called from invalid context at kernel/locking/mutex.c:909 [ 41.576757] in_atomic(): 1, irqs_disabl

[PATCH 5.3 145/166] net: dsa: rtl8366: Check VLAN ID and not ports

2019-10-06 Thread Greg Kroah-Hartman
From: Linus Walleij [ Upstream commit e8521e53cca584ddf8ec4584d3c550a6c65f88c4 ] There has been some confusion between the port number and the VLAN ID in this driver. What we need to check for validity is the VLAN ID, nothing else. The current confusion came from assigning a few default VLANs f

[PATCH 5.3 003/166] drm/bridge: tc358767: Increase AUX transfer length limit

2019-10-06 Thread Greg Kroah-Hartman
From: Andrey Smirnov [ Upstream commit e0655feaec62d5139b6b13a7b1bbb1ab8f1c2d83 ] According to the datasheet tc358767 can transfer up to 16 bytes via its AUX channel, so the artificial limit of 8 appears to be too low. However only up to 15-bytes seem to be actually supported and trying to use 1

[PATCH 5.3 082/166] MIPS: Ingenic: Disable broken BTB lookup optimization.

2019-10-06 Thread Greg Kroah-Hartman
From: Zhou Yanjie [ Upstream commit 053951dda71ecb4b554a2cdbe26f5f6f9bee9dd2 ] In order to further reduce power consumption, the XBurst core by default attempts to avoid branch target buffer lookups by detecting & special casing loops. This feature will cause BogoMIPS and lpj calculate in error.

[PATCH 5.3 153/166] net: dsa: sja1105: Ensure PTP time for rxtstamp reconstruction is not in the past

2019-10-06 Thread Greg Kroah-Hartman
From: Vladimir Oltean [ Upstream commit b6f2494d311a19b33b19708543e7ef6dea1de459 ] Sometimes the PTP synchronization on the switch 'jumps': ptp4l[11241.155]: rms8 max 16 freq -21732 +/- 11 delay 742 +/- 0 ptp4l[11243.157]: rms7 max 17 freq -21731 +/- 10 delay 744 +/- 0

[PATCH 5.3 148/166] 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 5.3 147/166] udp: only do GSO if # of segs > 1

2019-10-06 Thread Greg Kroah-Hartman
From: Josh Hunt [ Upstream commit 4094871db1d65810acab3d57f6089aa39ef7f648 ] Prior to this change an application sending <= 1MSS worth of data and enabling UDP GSO would fail if the system had SW GSO enabled, but the same send would succeed if HW GSO offload is enabled. In addition to this incon

[PATCH 5.3 146/166] tcp: adjust rto_base in retransmits_timed_out()

2019-10-06 Thread Greg Kroah-Hartman
From: Eric Dumazet [ Upstream commit 3256a2d6ab1f71f9a1bd2d7f6f18eb8108c48d17 ] The cited commit exposed an old retransmits_timed_out() bug which assumed it could call tcp_model_timeout() with TCP_RTO_MIN as rto_base for all states. But flows in SYN_SENT or SYN_RECV state uses a different RTO b

[PATCH 5.3 155/166] net: socionext: netsec: always grab descriptor lock

2019-10-06 Thread Greg Kroah-Hartman
From: Lorenzo Bianconi [ Upstream commit 55131dec2b1c7417d216f861ea7a29dc7c4d2d20 ] Always acquire tx descriptor spinlock even if a xdp program is not loaded on the netsec device since ndo_xdp_xmit can run concurrently with netsec_netdev_start_xmit and netsec_clean_tx_dring. This can happen load

[PATCH 5.3 024/166] 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 5.3 157/166] net: sched: taprio: Avoid division by zero on invalid link speed

2019-10-06 Thread Greg Kroah-Hartman
From: Vladimir Oltean [ Upstream commit 9a9251a3534745d08a92abfeca0ca467b912b5f6 ] The check in taprio_set_picos_per_byte is currently not robust enough and will trigger this division by zero, due to e.g. PHYLINK not setting kset->base.speed when there is no PHY connected: [ 27.109992] Divisi

[PATCH 5.3 150/166] 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 5.3 156/166] net: sched: cbs: Avoid division by zero when calculating the port rate

2019-10-06 Thread Greg Kroah-Hartman
From: Vladimir Oltean [ Upstream commit 83c8c3cf45163f0c823db37be6ab04dfcf8ac751 ] As explained in the "net: sched: taprio: Avoid division by zero on invalid link speed" commit, it is legal for the ethtool API to return zero as a link speed. So guard against it to ensure we don't perform a divis

[PATCH 5.3 027/166] 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 5.3 020/166] 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 5.3 019/166] 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 5.3 022/166] PCI: rpaphp: Avoid a sometimes-uninitialized warning

2019-10-06 Thread Greg Kroah-Hartman
From: Nathan Chancellor [ Upstream commit 0df3e42167caaf9f8c7b64de3da40a459979afe8 ] When building with -Wsometimes-uninitialized, clang warns: drivers/pci/hotplug/rpaphp_core.c:243:14: warning: variable 'fndit' is used uninitialized whenever 'for' loop exits because its condition is false [-Ws

[PATCH 5.3 001/166] drm/vkms: Fix crc worker races

2019-10-06 Thread Greg Kroah-Hartman
From: Daniel Vetter [ Upstream commit 18d0952a838ba559655b0cd9cf85097ad63d9bca ] The issue we have is that the crc worker might fall behind. We've tried to handle this by tracking both the earliest frame for which it still needs to compute a crc, and the last one. Plus when the crtc_state change

[PATCH 5.3 016/166] drm/rockchip: Check for fast link training before enabling psr

2019-10-06 Thread Greg Kroah-Hartman
From: Sean Paul [ Upstream commit ad309284a52be47c8b3126c9376358bf381861bc ] Once we start shutting off the link during PSR, we're going to want fast training to work. If the display doesn't support fast training, don't enable psr. Changes in v2: - None Changes in v3: - None Changes in v4: - No

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