[PATCH 4.9 32/49] net: watchdog: hold device global xmit lock during tx disable

2021-02-22 Thread Greg Kroah-Hartman
From: Edwin Peer commit 3aa6bce9af0e25b735c9c1263739a5639a336ae8 upstream. Prevent netif_tx_disable() running concurrently with dev_watchdog() by taking the device global xmit lock. Otherwise, the recommended: netif_carrier_off(dev); netif_tx_disable(dev); driver shutdown

[PATCH 4.9 35/49] x86/build: Disable CET instrumentation in the kernel for 32-bit too

2021-02-22 Thread Greg Kroah-Hartman
From: Borislav Petkov commit 256b92af784d5043eeb7d559b6d5963dcc2ecb10 upstream. Commit 20bf2b378729 ("x86/build: Disable CET instrumentation in the kernel") disabled CET instrumentation which gets added by default by the Ubuntu gcc9 and 10 by default, but did that only for 64-bit builds. It

[PATCH 4.9 31/49] net/vmw_vsock: improve locking in vsock_connect_timeout()

2021-02-22 Thread Greg Kroah-Hartman
From: Norbert Slusarek commit 3d0bc44d39bca615b72637e340317b7899b7f911 upstream. A possible locking issue in vsock_connect_timeout() was recognized by Eric Dumazet which might cause a null pointer dereference in vsock_transport_cancel_pkt(). This patch assures that vsock_transport_cancel_pkt()

[PATCH 4.9 36/49] trace: Use -mcount-record for dynamic ftrace

2021-02-22 Thread Greg Kroah-Hartman
From: Andi Kleen commit 96f60dfa5819a065bfdd2f2ba0df7d9cbce7f4dd upstream. gcc 5 supports a new -mcount-record option to generate ftrace tables directly. This avoids the need to run record_mcount manually. Use this option when available. So far doesn't use -mcount-nop, which also exists now.

[PATCH 4.9 30/49] usb: dwc3: ulpi: Replace CPU-based busyloop with Protocol-based one

2021-02-22 Thread Greg Kroah-Hartman
From: Serge Semin commit fca3f138105727c3a22edda32d02f91ce1bf11c9 upstream Originally the procedure of the ULPI transaction finish detection has been developed as a simple busy-loop with just decrementing counter and no delays. It's wrong since on different systems the loop will take a

[PATCH 4.9 24/49] bpf: Check for integer overflow when using roundup_pow_of_two()

2021-02-22 Thread Greg Kroah-Hartman
From: Bui Quang Minh [ Upstream commit 6183f4d3a0a2ad230511987c6c362ca43ec0055f ] On 32-bit architecture, roundup_pow_of_two() can return 0 when the argument has upper most bit set due to resulting 1UL << 32. Add a check for this case. Fixes: d5a3b1f69186 ("bpf: introduce

[PATCH 4.9 28/49] h8300: fix PREEMPTION build, TI_PRE_COUNT undefined

2021-02-22 Thread Greg Kroah-Hartman
From: Randy Dunlap [ Upstream commit ade9679c159d5bbe14fb7e59e97daf6062872e2b ] Fix a build error for undefined 'TI_PRE_COUNT' by adding it to asm-offsets.c. h8300-linux-ld: arch/h8300/kernel/entry.o: in function `resume_kernel': (.text+0x29a): undefined reference to `TI_PRE_COUNT' Link:

[PATCH 4.9 25/49] netfilter: xt_recent: Fix attempt to update deleted entry

2021-02-22 Thread Greg Kroah-Hartman
From: Jozsef Kadlecsik [ Upstream commit b1bdde33b72366da20d10770ab7a49fe87b5e190 ] When both --reap and --update flag are specified, there's a code path at which the entry to be updated is reaped beforehand, which then leads to kernel crash. Reap only entries which won't be updated. Fixes

[PATCH 4.9 27/49] netfilter: conntrack: skip identical origin tuple in same zone only

2021-02-22 Thread Greg Kroah-Hartman
From: Florian Westphal [ Upstream commit 07998281c268592963e1cd623fe6ab0270b65ae4 ] The origin skip check needs to re-test the zone. Else, we might skip a colliding tuple in the reply direction. This only occurs when using 'directional zones' where origin tuples reside in different zones but

[PATCH 4.9 23/49] memblock: do not start bottom-up allocations with kernel_end

2021-02-22 Thread Greg Kroah-Hartman
From: Roman Gushchin [ Upstream commit 2dcb3964544177c51853a210b6ad400de78ef17d ] With kaslr the kernel image is placed at a random place, so starting the bottom-up allocation with the kernel_end can result in an allocation failure and a warning like this one: hugetlb_cma: reserve 2048 MiB,

[PATCH 4.9 11/49] include/trace/events/writeback.h: fix -Wstringop-truncation warnings

2021-02-22 Thread Greg Kroah-Hartman
From: Qian Cai [ Upstream commit d1a445d3b86c9341ce7a0954c23be0edb5c9bec5 ] There are many of those warnings. In file included from ./arch/powerpc/include/asm/paca.h:15, from ./arch/powerpc/include/asm/current.h:13, from ./include/linux/thread_info.h:21,

[PATCH 4.9 22/49] ARM: dts: lpc32xx: Revert set default clock rate of HCLK PLL

2021-02-22 Thread Greg Kroah-Hartman
From: Alexandre Belloni [ Upstream commit 5638159f6d93b99ec9743ac7f65563fca3cf413d ] This reverts commit c17e9377aa81664d94b4f2102559fcf2a01ec8e7. The lpc32xx clock driver is not able to actually change the PLL rate as this would require reparenting ARM_CLK, DDRAM_CLK, PERIPH_CLK to SYSCLK,

[PATCH 4.9 29/49] usb: dwc3: ulpi: fix checkpatch warning

2021-02-22 Thread Greg Kroah-Hartman
From: Felipe Balbi commit 2a499b45295206e7f3dc76edadde891c06cc4447 upstream no functional changes. Signed-off-by: Felipe Balbi Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman --- drivers/usb/dwc3/ulpi.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---

[PATCH 4.9 26/49] xen/netback: avoid race in xenvif_rx_ring_slots_available()

2021-02-22 Thread Greg Kroah-Hartman
From: Juergen Gross [ Upstream commit ec7d8e7dd3a59528e305a18e93f1cb98f7faf83b ] Since commit 23025393dbeb3b8b3 ("xen/netback: use lateeoi irq binding") xenvif_rx_ring_slots_available() is no longer called only from the rx queue kernel thread, so it needs to access the rx queue with the

[PATCH 4.4 26/35] Xen/x86: also check kernel mapping in set_foreign_p2m_mapping()

2021-02-22 Thread Greg Kroah-Hartman
From: Jan Beulich commit b512e1b077e5ccdbd6e225b15d934ab12453b70a upstream. We should not set up further state if either mapping failed; paying attention to just the user mapping's status isn't enough. Also use GNTST_okay instead of implying its value (zero). This is part of XSA-361.

[PATCH 4.4 24/35] tracing: Avoid calling cc-option -mrecord-mcount for every Makefile

2021-02-22 Thread Greg Kroah-Hartman
From: Vasily Gorbik commit 07d0408120216b60625c9a5b8012d1c3a907984d upstream. Currently if CONFIG_FTRACE_MCOUNT_RECORD is enabled -mrecord-mcount compiler flag support is tested for every Makefile. Top 4 cc-option usages: 511 -mrecord-mcount 11 -fno-stack-protector 9

[PATCH 4.9 05/49] iwlwifi: mvm: take mutex for calling iwl_mvm_get_sync_time()

2021-02-22 Thread Greg Kroah-Hartman
From: Johannes Berg [ Upstream commit 5c56d862c749669d45c256f581eac4244be00d4d ] We need to take the mutex to call iwl_mvm_get_sync_time(), do it. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link:

[PATCH 4.4 25/35] Xen/x86: dont bail early from clear_foreign_p2m_mapping()

2021-02-22 Thread Greg Kroah-Hartman
From: Jan Beulich commit a35f2ef3b7376bfd0a57f7844bd7454389aae1fc upstream. Its sibling (set_foreign_p2m_mapping()) as well as the sibling of its only caller (gnttab_map_refs()) don't clean up after themselves in case of error. Higher level callers are expected to do so. However, in order for

[PATCH 4.9 21/49] ovl: skip getxattr of security labels

2021-02-22 Thread Greg Kroah-Hartman
From: Amir Goldstein [ Upstream commit 03fedf93593c82538b18476d8c4f0e8f8435ea70 ] When inode has no listxattr op of its own (e.g. squashfs) vfs_listxattr calls the LSM inode_listsecurity hooks to list the xattrs that LSMs will intercept in inode_getxattr hooks. When selinux LSM is installed

[PATCH 4.9 20/49] tracing: Check length before giving out the filter buffer

2021-02-22 Thread Greg Kroah-Hartman
From: Steven Rostedt (VMware) commit b220c049d5196dd94d992dd2dc8cba1a5e6123bf upstream. When filters are used by trace events, a page is allocated on each CPU and used to copy the trace event fields to this page before writing to the ring buffer. The reason to use the filter and not write

[PATCH 4.4 22/35] trace: Use -mcount-record for dynamic ftrace

2021-02-22 Thread Greg Kroah-Hartman
From: Andi Kleen commit 96f60dfa5819a065bfdd2f2ba0df7d9cbce7f4dd upstream. gcc 5 supports a new -mcount-record option to generate ftrace tables directly. This avoids the need to run record_mcount manually. Use this option when available. So far doesn't use -mcount-nop, which also exists now.

[PATCH 4.9 00/49] 4.9.258-rc1 review

2021-02-22 Thread Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.9.258 release. There are 49 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 Wed, 24 Feb 2021 12:07:46 +. Anything

[PATCH 4.4 23/35] tracing: Fix SKIP_STACK_VALIDATION=1 build due to bad merge with -mrecord-mcount

2021-02-22 Thread Greg Kroah-Hartman
From: Greg Thelen commit ed7d40bc67b8353c677b38c6cdddcdc310c0f452 upstream. Non gcc-5 builds with CONFIG_STACK_VALIDATION=y and SKIP_STACK_VALIDATION=1 fail. Example output: /bin/sh: init/.tmp_main.o: Permission denied commit 96f60dfa5819 ("trace: Use -mcount-record for dynamic ftrace"),

[PATCH 4.9 10/49] lib/string: Add strscpy_pad() function

2021-02-22 Thread Greg Kroah-Hartman
From: Tobin C. Harding [ Upstream commit 458a3bf82df4fe1f951d0f52b1e0c1e9d5a88a3b ] We have a function to copy strings safely and we have a function to copy strings and zero the tail of the destination (if source string is shorter than destination buffer) but we do not have a function to do

[PATCH 4.4 31/35] xen-netback: dont "handle" error by BUG()

2021-02-22 Thread Greg Kroah-Hartman
From: Jan Beulich commit 3194a1746e8aabe86075fd3c5e7cf1f4632d7f16 upstream. In particular -ENOMEM may come back here, from set_foreign_p2m_mapping(). Don't make problems worse, the more that handling elsewhere (together with map's status fields now indicating whether a mapping wasn't even

[PATCH 4.9 19/49] tracing: Do not count ftrace events in top level enable output

2021-02-22 Thread Greg Kroah-Hartman
From: Steven Rostedt (VMware) commit 256cfdd6fdf70c6fcf0f7c8ddb0ebd73ce8f3bc9 upstream. The file /sys/kernel/tracing/events/enable is used to enable all events by echoing in "1", or disabling all events when echoing in "0". To know if all events are enabled, disabled, or some are enabled but

[PATCH 4.9 08/49] SUNRPC: Move simple_get_bytes and simple_get_netobj into private header

2021-02-22 Thread Greg Kroah-Hartman
From: Dave Wysochanski [ Upstream commit ba6dfce47c4d002d96cd02a304132fca76981172 ] Remove duplicated helper functions to parse opaque XDR objects and place inside new file net/sunrpc/auth_gss/auth_gss_internal.h. In the new file carry the license and copyright from the source file

[PATCH 4.4 20/35] vsock: fix locking in vsock_shutdown()

2021-02-22 Thread Greg Kroah-Hartman
From: Stefano Garzarella commit 1c5fae9c9a092574398a17facc31c533791ef232 upstream. In vsock_shutdown() we touched some socket fields without holding the socket lock, such as 'state' and 'sk_flags'. Also, after the introduction of multi-transport, we are accessing 'vsk->transport' in

[PATCH 4.4 35/35] kvm: check tlbs_dirty directly

2021-02-22 Thread Greg Kroah-Hartman
From: Lai Jiangshan commit 88bf56d04bc3564542049ec4ec168a8b60d0b48c upstream In kvm_mmu_notifier_invalidate_range_start(), tlbs_dirty is used as: need_tlb_flush |= kvm->tlbs_dirty; with need_tlb_flush's type being int and tlbs_dirty's type being long. It means that tlbs_dirty is always

[PATCH 4.4 33/35] xen-blkback: fix error handling in xen_blkbk_map()

2021-02-22 Thread Greg Kroah-Hartman
From: Jan Beulich commit 871997bc9e423f05c7da7c9178e62dde5df2a7f8 upstream. The function uses a goto-based loop, which may lead to an earlier error getting discarded by a later iteration. Exit this ad-hoc loop when an error was encountered. The out-of-memory error path additionally fails to

[PATCH 4.4 32/35] xen-scsiback: dont "handle" error by BUG()

2021-02-22 Thread Greg Kroah-Hartman
From: Jan Beulich commit 7c77474b2d22176d2bfb592ec74e0f2cb71352c9 upstream. In particular -ENOMEM may come back here, from set_foreign_p2m_mapping(). Don't make problems worse, the more that handling elsewhere (together with map's status fields now indicating whether a mapping wasn't even

[PATCH 4.4 30/35] xen-blkback: dont "handle" error by BUG()

2021-02-22 Thread Greg Kroah-Hartman
From: Jan Beulich commit 5a264285ed1cd32e26d9de4f3c8c6855e467fd63 upstream. In particular -ENOMEM may come back here, from set_foreign_p2m_mapping(). Don't make problems worse, the more that handling elsewhere (together with map's status fields now indicating whether a mapping wasn't even

Re: [PATCH] rtw88: 8822ce: fix wifi disconnect after S3/S4 on HONOR laptop

2021-02-22 Thread Hao Chen
Hi: I have tried setting module parameter disable_aspm=1, but it's not useful. >The cpu info is follow: uos@uos-PC:~$ lscpu Architecture:    x86_64 CPU op-mode(s):  32-bit, 64-bit Byte Order:  Little Endian Address sizes:   48 bits physical, 48 bits virtual CPU(s):  

[PATCH 4.9 06/49] iwlwifi: pcie: add a NULL check in iwl_pcie_txq_unmap

2021-02-22 Thread Greg Kroah-Hartman
From: Emmanuel Grumbach [ Upstream commit 98c7d21f957b10d9c07a3a60a3a5a8f326a197e5 ] I hit a NULL pointer exception in this function when the init flow went really bad. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link:

[PATCH 4.9 07/49] iwlwifi: mvm: guard against device removal in reprobe

2021-02-22 Thread Greg Kroah-Hartman
From: Johannes Berg [ Upstream commit 7a21b1d4a728a483f07c638ccd8610d4b4f12684 ] If we get into a problem severe enough to attempt a reprobe, we schedule a worker to do that. However, if the problem gets more severe and the device is actually destroyed before this worker has a chance to run, we

[PATCH 4.9 01/49] mm: memcontrol: fix NULL pointer crash in test_clear_page_writeback()

2021-02-22 Thread Greg Kroah-Hartman
From: Johannes Weiner commit 739f79fc9db1b38f96b5a5109b247a650fbebf6d upstream. Jaegeuk and Brad report a NULL pointer crash when writeback ending tries to update the memcg stats: BUG: unable to handle kernel NULL pointer dereference at 03b0 IP:

[PATCH 4.9 04/49] af_key: relax availability checks for skb size calculation

2021-02-22 Thread Greg Kroah-Hartman
From: Cong Wang [ Upstream commit afbc293add6466f8f3f0c3d944d85f53709c170f ] xfrm_probe_algs() probes kernel crypto modules and changes the availability of struct xfrm_algo_desc. But there is a small window where ealg->available and aalg->available get changed between

[PATCH 4.9 03/49] remoteproc: qcom_q6v5_mss: Validate MBA firmware size before load

2021-02-22 Thread Greg Kroah-Hartman
From: Sibi Sankar commit e013f455d95add874f310dc47c608e8c70692ae5 upstream The following mem abort is observed when the mba firmware size exceeds the allocated mba region. MBA firmware size is restricted to a maximum size of 1M and remaining memory region is used by modem debug policy firmware

[PATCH 4.4 17/35] usb: dwc3: ulpi: fix checkpatch warning

2021-02-22 Thread Greg Kroah-Hartman
From: Felipe Balbi commit 2a499b45295206e7f3dc76edadde891c06cc4447 upstream no functional changes. Signed-off-by: Felipe Balbi Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman --- drivers/usb/dwc3/ulpi.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---

[PATCH 4.9 02/49] fgraph: Initialize tracing_graph_pause at task creation

2021-02-22 Thread Greg Kroah-Hartman
From: Steven Rostedt (VMware) commit 7e0a9220467dbcfdc5bc62825724f3e52e50ab31 upstream. On some archs, the idle task can call into cpu_suspend(). The cpu_suspend() will disable or pause function graph tracing, as there's some paths in bringing down the CPU that can have issues with its return

[PATCH 4.4 21/35] x86/build: Disable CET instrumentation in the kernel for 32-bit too

2021-02-22 Thread Greg Kroah-Hartman
From: Borislav Petkov commit 256b92af784d5043eeb7d559b6d5963dcc2ecb10 upstream. Commit 20bf2b378729 ("x86/build: Disable CET instrumentation in the kernel") disabled CET instrumentation which gets added by default by the Ubuntu gcc9 and 10 by default, but did that only for 64-bit builds. It

[PATCH 4.4 34/35] scsi: qla2xxx: Fix crash during driver load on big endian machines

2021-02-22 Thread Greg Kroah-Hartman
From: Arun Easi commit 8de309e7299a00b3045fb274f82b326f356404f0 upstream Crash stack: [576544.715489] Unable to handle kernel paging request for data at address 0xdf97 [576544.715497] Faulting instruction address: 0xdf880f64 [576544.715503] Oops:

[PATCH 4.4 19/35] net: watchdog: hold device global xmit lock during tx disable

2021-02-22 Thread Greg Kroah-Hartman
From: Edwin Peer commit 3aa6bce9af0e25b735c9c1263739a5639a336ae8 upstream. Prevent netif_tx_disable() running concurrently with dev_watchdog() by taking the device global xmit lock. Otherwise, the recommended: netif_carrier_off(dev); netif_tx_disable(dev); driver shutdown

[PATCH 4.4 29/35] xen/arm: dont ignore return errors from set_phys_to_machine

2021-02-22 Thread Greg Kroah-Hartman
From: Stefano Stabellini commit 36bf1dfb8b266e089afa9b7b984217f17027bf35 upstream. set_phys_to_machine can fail due to lack of memory, see the kzalloc call in arch/arm/xen/p2m.c:__set_phys_to_machine_multi. Don't ignore the potential return error in set_foreign_p2m_mapping, returning it to the

[PATCH 4.4 18/35] usb: dwc3: ulpi: Replace CPU-based busyloop with Protocol-based one

2021-02-22 Thread Greg Kroah-Hartman
From: Serge Semin commit fca3f138105727c3a22edda32d02f91ce1bf11c9 upstream Originally the procedure of the ULPI transaction finish detection has been developed as a simple busy-loop with just decrementing counter and no delays. It's wrong since on different systems the loop will take a

[PATCH 4.4 27/35] Xen/gntdev: correct dev_bus_addr handling in gntdev_map_grant_pages()

2021-02-22 Thread Greg Kroah-Hartman
From: Jan Beulich commit dbe5283605b3bc12ca45def09cc721a0a5c853a2 upstream. We may not skip setting the field in the unmap structure when GNTMAP_device_map is in use - such an unmap would fail to release the respective resources (a page ref in the hypervisor). Otoh the field doesn't need

[PATCH 4.4 28/35] Xen/gntdev: correct error checking in gntdev_map_grant_pages()

2021-02-22 Thread Greg Kroah-Hartman
From: Jan Beulich commit ebee0eab08594b2bd5db716288a4f1ae5936e9bc upstream. Failure of the kernel part of the mapping operation should also be indicated as an error to the caller, or else it may assume the respective kernel VA is okay to access. Furthermore gnttab_map_refs() failing still

[PATCH 4.4 09/35] include/trace/events/writeback.h: fix -Wstringop-truncation warnings

2021-02-22 Thread Greg Kroah-Hartman
From: Qian Cai [ Upstream commit d1a445d3b86c9341ce7a0954c23be0edb5c9bec5 ] There are many of those warnings. In file included from ./arch/powerpc/include/asm/paca.h:15, from ./arch/powerpc/include/asm/current.h:13, from ./include/linux/thread_info.h:21,

[PATCH 4.4 00/35] 4.4.258-rc1 review

2021-02-22 Thread Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.4.258 release. There are 35 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 Wed, 24 Feb 2021 12:07:46 +. Anything

[PATCH 4.4 16/35] h8300: fix PREEMPTION build, TI_PRE_COUNT undefined

2021-02-22 Thread Greg Kroah-Hartman
From: Randy Dunlap [ Upstream commit ade9679c159d5bbe14fb7e59e97daf6062872e2b ] Fix a build error for undefined 'TI_PRE_COUNT' by adding it to asm-offsets.c. h8300-linux-ld: arch/h8300/kernel/entry.o: in function `resume_kernel': (.text+0x29a): undefined reference to `TI_PRE_COUNT' Link:

[PATCH 4.4 15/35] netfilter: xt_recent: Fix attempt to update deleted entry

2021-02-22 Thread Greg Kroah-Hartman
From: Jozsef Kadlecsik [ Upstream commit b1bdde33b72366da20d10770ab7a49fe87b5e190 ] When both --reap and --update flag are specified, there's a code path at which the entry to be updated is reaped beforehand, which then leads to kernel crash. Reap only entries which won't be updated. Fixes

[PATCH 4.4 13/35] squashfs: add more sanity checks in xattr id lookup

2021-02-22 Thread Greg Kroah-Hartman
From: Phillip Lougher commit 506220d2ba21791314af569211ffd8870b8208fa upstream. Sysbot has reported a warning where a kmalloc() attempt exceeds the maximum limit. This has been identified as corruption of the xattr_ids count when reading the xattr id lookup table. This patch adds a number of

[PATCH 4.4 02/35] fgraph: Initialize tracing_graph_pause at task creation

2021-02-22 Thread Greg Kroah-Hartman
From: Steven Rostedt (VMware) commit 7e0a9220467dbcfdc5bc62825724f3e52e50ab31 upstream. On some archs, the idle task can call into cpu_suspend(). The cpu_suspend() will disable or pause function graph tracing, as there's some paths in bringing down the CPU that can have issues with its return

[PATCH 4.4 08/35] lib/string: Add strscpy_pad() function

2021-02-22 Thread Greg Kroah-Hartman
From: Tobin C. Harding [ Upstream commit 458a3bf82df4fe1f951d0f52b1e0c1e9d5a88a3b ] We have a function to copy strings safely and we have a function to copy strings and zero the tail of the destination (if source string is shorter than destination buffer) but we do not have a function to do

[PATCH 4.4 07/35] SUNRPC: Handle 0 length opaque XDR object data properly

2021-02-22 Thread Greg Kroah-Hartman
From: Dave Wysochanski [ Upstream commit e4a7d1f7707eb44fd953a31dd59eff82009d879c ] When handling an auth_gss downcall, it's possible to get 0-length opaque object for the acceptor. In the case of a 0-length XDR object, make sure simple_get_netobj() fills in dest->data = NULL, and does not

[PATCH 4.4 03/35] af_key: relax availability checks for skb size calculation

2021-02-22 Thread Greg Kroah-Hartman
From: Cong Wang [ Upstream commit afbc293add6466f8f3f0c3d944d85f53709c170f ] xfrm_probe_algs() probes kernel crypto modules and changes the availability of struct xfrm_algo_desc. But there is a small window where ealg->available and aalg->available get changed between

[PATCH 4.4 05/35] iwlwifi: mvm: guard against device removal in reprobe

2021-02-22 Thread Greg Kroah-Hartman
From: Johannes Berg [ Upstream commit 7a21b1d4a728a483f07c638ccd8610d4b4f12684 ] If we get into a problem severe enough to attempt a reprobe, we schedule a worker to do that. However, if the problem gets more severe and the device is actually destroyed before this worker has a chance to run, we

[PATCH 4.4 10/35] memcg: fix a crash in wb_workfn when a device disappears

2021-02-22 Thread Greg Kroah-Hartman
From: Theodore Ts'o [ Upstream commit 68f23b89067fdf187763e75a56087550624fdbee ] Without memcg, there is a one-to-one mapping between the bdi and bdi_writeback structures. In this world, things are fairly straightforward; the first thing bdi_unregister() does is to shutdown the bdi_writeback

[PATCH 4.4 06/35] SUNRPC: Move simple_get_bytes and simple_get_netobj into private header

2021-02-22 Thread Greg Kroah-Hartman
From: Dave Wysochanski [ Upstream commit ba6dfce47c4d002d96cd02a304132fca76981172 ] Remove duplicated helper functions to parse opaque XDR objects and place inside new file net/sunrpc/auth_gss/auth_gss_internal.h. In the new file carry the license and copyright from the source file

[PATCH 4.4 04/35] iwlwifi: pcie: add a NULL check in iwl_pcie_txq_unmap

2021-02-22 Thread Greg Kroah-Hartman
From: Emmanuel Grumbach [ Upstream commit 98c7d21f957b10d9c07a3a60a3a5a8f326a197e5 ] I hit a NULL pointer exception in this function when the init flow went really bad. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link:

[PATCH 4.4 14/35] memblock: do not start bottom-up allocations with kernel_end

2021-02-22 Thread Greg Kroah-Hartman
From: Roman Gushchin [ Upstream commit 2dcb3964544177c51853a210b6ad400de78ef17d ] With kaslr the kernel image is placed at a random place, so starting the bottom-up allocation with the kernel_end can result in an allocation failure and a warning like this one: hugetlb_cma: reserve 2048 MiB,

[PATCH 4.4 12/35] squashfs: add more sanity checks in inode lookup

2021-02-22 Thread Greg Kroah-Hartman
From: Phillip Lougher commit eabac19e40c095543def79cb6ffeb3a8588aaff4 upstream. Sysbot has reported an "slab-out-of-bounds read" error which has been identified as being caused by a corrupted "ino_num" value read from the inode. This could be because the metadata block is uncompressed, or

[PATCH 4.4 11/35] squashfs: add more sanity checks in id lookup

2021-02-22 Thread Greg Kroah-Hartman
From: Phillip Lougher commit f37aa4c7366e23f91b81d00bafd6a7ab54e4a381 upstream. Sysbot has reported a number of "slab-out-of-bounds reads" and "use-after-free read" errors which has been identified as being caused by a corrupted index value read from the inode. This could be because the

[PATCH 4.4 01/35] tracing: Do not count ftrace events in top level enable output

2021-02-22 Thread Greg Kroah-Hartman
From: Steven Rostedt (VMware) commit 256cfdd6fdf70c6fcf0f7c8ddb0ebd73ce8f3bc9 upstream. The file /sys/kernel/tracing/events/enable is used to enable all events by echoing in "1", or disabling all events when echoing in "0". To know if all events are enabled, disabled, or some are enabled but

[PATCH 4.14 28/57] memblock: do not start bottom-up allocations with kernel_end

2021-02-22 Thread Greg Kroah-Hartman
From: Roman Gushchin [ Upstream commit 2dcb3964544177c51853a210b6ad400de78ef17d ] With kaslr the kernel image is placed at a random place, so starting the bottom-up allocation with the kernel_end can result in an allocation failure and a warning like this one: hugetlb_cma: reserve 2048 MiB,

[PATCH 4.14 37/57] vsock/virtio: update credit only if socket is not closed

2021-02-22 Thread Greg Kroah-Hartman
From: Stefano Garzarella commit ce7536bc7398e2ae552d2fabb7e0e371a9f1fe46 upstream. If the socket is closed or is being released, some resources used by virtio_transport_space_update() such as 'vsk->trans' may be released. To avoid a use after free bug we should only update the available credit

[PATCH 4.14 34/57] usb: dwc3: ulpi: Replace CPU-based busyloop with Protocol-based one

2021-02-22 Thread Greg Kroah-Hartman
From: Serge Semin commit fca3f138105727c3a22edda32d02f91ce1bf11c9 upstream Originally the procedure of the ULPI transaction finish detection has been developed as a simple busy-loop with just decrementing counter and no delays. It's wrong since on different systems the loop will take a

[PATCH 4.14 35/57] net/vmw_vsock: improve locking in vsock_connect_timeout()

2021-02-22 Thread Greg Kroah-Hartman
From: Norbert Slusarek commit 3d0bc44d39bca615b72637e340317b7899b7f911 upstream. A possible locking issue in vsock_connect_timeout() was recognized by Eric Dumazet which might cause a null pointer dereference in vsock_transport_cancel_pkt(). This patch assures that vsock_transport_cancel_pkt()

[PATCH 4.14 36/57] net: watchdog: hold device global xmit lock during tx disable

2021-02-22 Thread Greg Kroah-Hartman
From: Edwin Peer commit 3aa6bce9af0e25b735c9c1263739a5639a336ae8 upstream. Prevent netif_tx_disable() running concurrently with dev_watchdog() by taking the device global xmit lock. Otherwise, the recommended: netif_carrier_off(dev); netif_tx_disable(dev); driver shutdown

[PATCH 4.14 32/57] netfilter: conntrack: skip identical origin tuple in same zone only

2021-02-22 Thread Greg Kroah-Hartman
From: Florian Westphal [ Upstream commit 07998281c268592963e1cd623fe6ab0270b65ae4 ] The origin skip check needs to re-test the zone. Else, we might skip a colliding tuple in the reply direction. This only occurs when using 'directional zones' where origin tuples reside in different zones but

[PATCH 4.14 33/57] usb: dwc3: ulpi: fix checkpatch warning

2021-02-22 Thread Greg Kroah-Hartman
From: Felipe Balbi commit 2a499b45295206e7f3dc76edadde891c06cc4447 upstream no functional changes. Signed-off-by: Felipe Balbi Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman --- drivers/usb/dwc3/ulpi.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---

[PATCH 4.14 57/57] kvm: check tlbs_dirty directly

2021-02-22 Thread Greg Kroah-Hartman
From: Lai Jiangshan commit 88bf56d04bc3564542049ec4ec168a8b60d0b48c upstream In kvm_mmu_notifier_invalidate_range_start(), tlbs_dirty is used as: need_tlb_flush |= kvm->tlbs_dirty; with need_tlb_flush's type being int and tlbs_dirty's type being long. It means that tlbs_dirty is always

[PATCH 4.14 56/57] usb: gadget: u_ether: Fix MTU size mismatch with RX packet size

2021-02-22 Thread Greg Kroah-Hartman
From: Manish Narani commit 0a88fa221ce911c331bf700d2214c5b2f77414d3 upstream Fix the MTU size issue with RX packet size as the host sends the packet with extra bytes containing ethernet header. This causes failure when user sets the MTU size to the maximum i.e. 15412. In this case the ethernet

[PATCH 4.14 31/57] xen/netback: avoid race in xenvif_rx_ring_slots_available()

2021-02-22 Thread Greg Kroah-Hartman
From: Juergen Gross [ Upstream commit ec7d8e7dd3a59528e305a18e93f1cb98f7faf83b ] Since commit 23025393dbeb3b8b3 ("xen/netback: use lateeoi irq binding") xenvif_rx_ring_slots_available() is no longer called only from the rx queue kernel thread, so it needs to access the rx queue with the

[PATCH 4.14 54/57] scsi: qla2xxx: Fix crash during driver load on big endian machines

2021-02-22 Thread Greg Kroah-Hartman
From: Arun Easi commit 8de309e7299a00b3045fb274f82b326f356404f0 upstream Crash stack: [576544.715489] Unable to handle kernel paging request for data at address 0xdf97 [576544.715497] Faulting instruction address: 0xdf880f64 [576544.715503] Oops:

[PATCH 4.14 55/57] USB: Gadget Ethernet: Re-enable Jumbo frames.

2021-02-22 Thread Greg Kroah-Hartman
From: John Greb commit eea52743eb5654ec6f52b0e8b4aefec952543697 upstream Fixes: ("net: use core MTU range checking") which patched only one of two functions used to setup the USB Gadget Ethernet driver, causing a serious performance regression in the ability to increase mtu size above 1500.

[PATCH 4.14 52/57] xen-scsiback: dont "handle" error by BUG()

2021-02-22 Thread Greg Kroah-Hartman
From: Jan Beulich commit 7c77474b2d22176d2bfb592ec74e0f2cb71352c9 upstream. In particular -ENOMEM may come back here, from set_foreign_p2m_mapping(). Don't make problems worse, the more that handling elsewhere (together with map's status fields now indicating whether a mapping wasn't even

[PATCH 4.14 51/57] xen-netback: dont "handle" error by BUG()

2021-02-22 Thread Greg Kroah-Hartman
From: Jan Beulich commit 3194a1746e8aabe86075fd3c5e7cf1f4632d7f16 upstream. In particular -ENOMEM may come back here, from set_foreign_p2m_mapping(). Don't make problems worse, the more that handling elsewhere (together with map's status fields now indicating whether a mapping wasn't even

[PATCH 4.14 53/57] xen-blkback: fix error handling in xen_blkbk_map()

2021-02-22 Thread Greg Kroah-Hartman
From: Jan Beulich commit 871997bc9e423f05c7da7c9178e62dde5df2a7f8 upstream. The function uses a goto-based loop, which may lead to an earlier error getting discarded by a later iteration. Exit this ad-hoc loop when an error was encountered. The out-of-memory error path additionally fails to

[PATCH 4.14 50/57] xen-blkback: dont "handle" error by BUG()

2021-02-22 Thread Greg Kroah-Hartman
From: Jan Beulich commit 5a264285ed1cd32e26d9de4f3c8c6855e467fd63 upstream. In particular -ENOMEM may come back here, from set_foreign_p2m_mapping(). Don't make problems worse, the more that handling elsewhere (together with map's status fields now indicating whether a mapping wasn't even

[PATCH 4.14 47/57] Xen/gntdev: correct dev_bus_addr handling in gntdev_map_grant_pages()

2021-02-22 Thread Greg Kroah-Hartman
From: Jan Beulich commit dbe5283605b3bc12ca45def09cc721a0a5c853a2 upstream. We may not skip setting the field in the unmap structure when GNTMAP_device_map is in use - such an unmap would fail to release the respective resources (a page ref in the hypervisor). Otoh the field doesn't need

[PATCH 4.14 30/57] netfilter: xt_recent: Fix attempt to update deleted entry

2021-02-22 Thread Greg Kroah-Hartman
From: Jozsef Kadlecsik [ Upstream commit b1bdde33b72366da20d10770ab7a49fe87b5e190 ] When both --reap and --update flag are specified, there's a code path at which the entry to be updated is reaped beforehand, which then leads to kernel crash. Reap only entries which won't be updated. Fixes

[PATCH 4.14 49/57] xen/arm: dont ignore return errors from set_phys_to_machine

2021-02-22 Thread Greg Kroah-Hartman
From: Stefano Stabellini commit 36bf1dfb8b266e089afa9b7b984217f17027bf35 upstream. set_phys_to_machine can fail due to lack of memory, see the kzalloc call in arch/arm/xen/p2m.c:__set_phys_to_machine_multi. Don't ignore the potential return error in set_foreign_p2m_mapping, returning it to the

[PATCH 4.14 48/57] Xen/gntdev: correct error checking in gntdev_map_grant_pages()

2021-02-22 Thread Greg Kroah-Hartman
From: Jan Beulich commit ebee0eab08594b2bd5db716288a4f1ae5936e9bc upstream. Failure of the kernel part of the mapping operation should also be indicated as an error to the caller, or else it may assume the respective kernel VA is okay to access. Furthermore gnttab_map_refs() failing still

[PATCH 4.14 43/57] tracing: Fix SKIP_STACK_VALIDATION=1 build due to bad merge with -mrecord-mcount

2021-02-22 Thread Greg Kroah-Hartman
From: Greg Thelen commit ed7d40bc67b8353c677b38c6cdddcdc310c0f452 upstream. Non gcc-5 builds with CONFIG_STACK_VALIDATION=y and SKIP_STACK_VALIDATION=1 fail. Example output: /bin/sh: init/.tmp_main.o: Permission denied commit 96f60dfa5819 ("trace: Use -mcount-record for dynamic ftrace"),

[PATCH 4.14 09/57] SUNRPC: Move simple_get_bytes and simple_get_netobj into private header

2021-02-22 Thread Greg Kroah-Hartman
From: Dave Wysochanski [ Upstream commit ba6dfce47c4d002d96cd02a304132fca76981172 ] Remove duplicated helper functions to parse opaque XDR objects and place inside new file net/sunrpc/auth_gss/auth_gss_internal.h. In the new file carry the license and copyright from the source file

[PATCH 4.14 42/57] trace: Use -mcount-record for dynamic ftrace

2021-02-22 Thread Greg Kroah-Hartman
From: Andi Kleen commit 96f60dfa5819a065bfdd2f2ba0df7d9cbce7f4dd upstream. gcc 5 supports a new -mcount-record option to generate ftrace tables directly. This avoids the need to run record_mcount manually. Use this option when available. So far doesn't use -mcount-nop, which also exists now.

[PATCH 4.14 39/57] i2c: stm32f7: fix configuration of the digital filter

2021-02-22 Thread Greg Kroah-Hartman
From: Alain Volmat [ Upstream commit 3d6a3d3a2a7a3a60a824e7c04e95fd50dec57812 ] The digital filter related computation are present in the driver however the programming of the filter within the IP is missing. The maximum value for the DNF is wrong and should be 15 instead of 16. Fixes:

[PATCH 4.14 38/57] vsock: fix locking in vsock_shutdown()

2021-02-22 Thread Greg Kroah-Hartman
From: Stefano Garzarella commit 1c5fae9c9a092574398a17facc31c533791ef232 upstream. In vsock_shutdown() we touched some socket fields without holding the socket lock, such as 'state' and 'sk_flags'. Also, after the introduction of multi-transport, we are accessing 'vsk->transport' in

[PATCH 4.14 44/57] tracing: Avoid calling cc-option -mrecord-mcount for every Makefile

2021-02-22 Thread Greg Kroah-Hartman
From: Vasily Gorbik commit 07d0408120216b60625c9a5b8012d1c3a907984d upstream. Currently if CONFIG_FTRACE_MCOUNT_RECORD is enabled -mrecord-mcount compiler flag support is tested for every Makefile. Top 4 cc-option usages: 511 -mrecord-mcount 11 -fno-stack-protector 9

[PATCH 4.14 45/57] Xen/x86: dont bail early from clear_foreign_p2m_mapping()

2021-02-22 Thread Greg Kroah-Hartman
From: Jan Beulich commit a35f2ef3b7376bfd0a57f7844bd7454389aae1fc upstream. Its sibling (set_foreign_p2m_mapping()) as well as the sibling of its only caller (gnttab_map_refs()) don't clean up after themselves in case of error. Higher level callers are expected to do so. However, in order for

[PATCH 4.14 40/57] h8300: fix PREEMPTION build, TI_PRE_COUNT undefined

2021-02-22 Thread Greg Kroah-Hartman
From: Randy Dunlap [ Upstream commit ade9679c159d5bbe14fb7e59e97daf6062872e2b ] Fix a build error for undefined 'TI_PRE_COUNT' by adding it to asm-offsets.c. h8300-linux-ld: arch/h8300/kernel/entry.o: in function `resume_kernel': (.text+0x29a): undefined reference to `TI_PRE_COUNT' Link:

[PATCH 4.14 46/57] Xen/x86: also check kernel mapping in set_foreign_p2m_mapping()

2021-02-22 Thread Greg Kroah-Hartman
From: Jan Beulich commit b512e1b077e5ccdbd6e225b15d934ab12453b70a upstream. We should not set up further state if either mapping failed; paying attention to just the user mapping's status isn't enough. Also use GNTST_okay instead of implying its value (zero). This is part of XSA-361.

[PATCH 4.14 41/57] x86/build: Disable CET instrumentation in the kernel for 32-bit too

2021-02-22 Thread Greg Kroah-Hartman
From: Borislav Petkov commit 256b92af784d5043eeb7d559b6d5963dcc2ecb10 upstream. Commit 20bf2b378729 ("x86/build: Disable CET instrumentation in the kernel") disabled CET instrumentation which gets added by default by the Ubuntu gcc9 and 10 by default, but did that only for 64-bit builds. It

[PATCH 4.14 00/57] 4.14.222-rc1 review

2021-02-22 Thread Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.14.222 release. There are 57 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 Wed, 24 Feb 2021 12:07:46 +. Anything

[PATCH 4.14 07/57] iwlwifi: pcie: add a NULL check in iwl_pcie_txq_unmap

2021-02-22 Thread Greg Kroah-Hartman
From: Emmanuel Grumbach [ Upstream commit 98c7d21f957b10d9c07a3a60a3a5a8f326a197e5 ] I hit a NULL pointer exception in this function when the init flow went really bad. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link:

[PATCH 4.14 29/57] bpf: Check for integer overflow when using roundup_pow_of_two()

2021-02-22 Thread Greg Kroah-Hartman
From: Bui Quang Minh [ Upstream commit 6183f4d3a0a2ad230511987c6c362ca43ec0055f ] On 32-bit architecture, roundup_pow_of_two() can return 0 when the argument has upper most bit set due to resulting 1UL << 32. Add a check for this case. Fixes: d5a3b1f69186 ("bpf: introduce

[PATCH 4.14 27/57] ARM: ensure the signal page contains defined contents

2021-02-22 Thread Greg Kroah-Hartman
From: Russell King [ Upstream commit 9c698bff66ab4914bb3d71da7dc6112519bde23e ] Ensure that the signal page contains our poison instruction to increase the protection against ROP attacks and also contains well defined contents. Acked-by: Will Deacon Signed-off-by: Russell King Signed-off-by:

[PATCH 4.14 06/57] iwlwifi: mvm: take mutex for calling iwl_mvm_get_sync_time()

2021-02-22 Thread Greg Kroah-Hartman
From: Johannes Berg [ Upstream commit 5c56d862c749669d45c256f581eac4244be00d4d ] We need to take the mutex to call iwl_mvm_get_sync_time(), do it. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link:

[PATCH 4.14 08/57] iwlwifi: mvm: guard against device removal in reprobe

2021-02-22 Thread Greg Kroah-Hartman
From: Johannes Berg [ Upstream commit 7a21b1d4a728a483f07c638ccd8610d4b4f12684 ] If we get into a problem severe enough to attempt a reprobe, we schedule a worker to do that. However, if the problem gets more severe and the device is actually destroyed before this worker has a chance to run, we

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