[PATCH 4.19 042/100] vfio/type1: Limit DMA mappings per container

2019-04-30 Thread Greg Kroah-Hartman
From: Alex Williamson commit 492855939bdb59c6f947b0b5b44af9ad82b7e38c upstream. Memory backed DMA mappings are accounted against a user's locked memory limit, including multiple mappings of the same memory. This accounting bounds the number of such mappings that a user can create. However, DMA

[PATCH 4.19 011/100] netfilter: nf_tables: bogus EBUSY in helper removal from transaction

2019-04-30 Thread Greg Kroah-Hartman
[ Upstream commit 8ffcd32f64633926163cdd07a7d295c500a947d1 ] Proper use counter updates when activating and deactivating the object, otherwise, this hits bogus EBUSY error. Fixes: cd5125d8f518 ("netfilter: nf_tables: split set destruction in deactivate and destroy phase") Reported-by: Laura

[PATCH 4.19 015/100] tipc: handle the err returned from cmd header function

2019-04-30 Thread Greg Kroah-Hartman
[ Upstream commit 2ac695d1d602ce00b12170242f58c3d3a8e36d04 ] Syzbot found a crash: BUG: KMSAN: uninit-value in tipc_nl_compat_name_table_dump+0x54f/0xcd0 net/tipc/netlink_compat.c:872 Call Trace: tipc_nl_compat_name_table_dump+0x54f/0xcd0 net/tipc/netlink_compat.c:872

[PATCH 4.19 013/100] net: mvpp2: fix validate for PPv2.1

2019-04-30 Thread Greg Kroah-Hartman
[ Upstream commit 8b318f30ab4ef9bbc1241e6f8c1db366dbd347f2 ] The Phylink validate function is the Marvell PPv2 driver makes a check on the GoP id. This is valid an has to be done when using PPv2.2 engines but makes no sense when using PPv2.1. The check done when using an RGMII interface makes

[PATCH] 9p/virtio: Add cleanup path in p9_virtio_init

2019-04-30 Thread YueHaibing
KASAN report this: BUG: unable to handle kernel paging request at a0097000 PGD 3870067 P4D 3870067 PUD 3871063 PMD 2326e2067 PTE 0 Oops: [#1 CPU: 0 PID: 5340 Comm: modprobe Not tainted 5.1.0-rc7+ #25 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS

[PATCH 4.19 012/100] net/ibmvnic: Fix RTNL deadlock during device reset

2019-04-30 Thread Greg Kroah-Hartman
[ Upstream commit 986103e7920cabc0b910749e77ae5589d3934d52 ] Commit a5681e20b541 ("net/ibmnvic: Fix deadlock problem in reset") made the change to hold the RTNL lock during driver reset but still calls netdev_notify_peers, which results in a deadlock. Instead, use call_netdevice_notifiers, which

[PATCH 4.19 055/100] workqueue: Try to catch flush_work() without INIT_WORK().

2019-04-30 Thread Greg Kroah-Hartman
From: Tetsuo Handa commit 4d43d395fed124631ca02356c711facb90185175 upstream. syzbot found a flush_work() caller who forgot to call INIT_WORK() because that work_struct was allocated by kzalloc() [1]. But the message INFO: trying to register non-static key. the code is fine but needs

[PATCH 4.19 046/100] powerpc/mm/radix: Make Radix require HUGETLB_PAGE

2019-04-30 Thread Greg Kroah-Hartman
From: Michael Ellerman commit 8adddf349fda0d3de2f6bb41ddf838cbf36a8ad2 upstream. Joel reported weird crashes using skiroot_defconfig, in his case we jumped into an NX page: kernel tried to execute exec-protected page (c2bff4f0) - exploit attempt? (uid: 0) BUG: Unable to handle

[PATCH 4.19 059/100] netfilter: ebtables: CONFIG_COMPAT: drop a bogus WARN_ON

2019-04-30 Thread Greg Kroah-Hartman
From: Florian Westphal commit 7caa56f006e9d712b44f27b32520c66420d5cbc6 upstream. It means userspace gave us a ruleset where there is some other data after the ebtables target but before the beginning of the next rule. Fixes: 81e675c227ec ("netfilter: ebtables: add CONFIG_COMPAT support")

[PATCH 4.19 060/100] fm10k: Fix a potential NULL pointer dereference

2019-04-30 Thread Greg Kroah-Hartman
From: Yue Haibing commit 01ca667133d019edc9f0a1f70a272447c84ec41f upstream. Syzkaller report this: kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: [#1] SMP KASAN PTI CPU: 0 PID: 4378 Comm: syz-executor.0 Tainted: G C5.0.0+ #5

[PATCH 4.19 061/100] tipc: check bearer name with right length in tipc_nl_compat_bearer_enable

2019-04-30 Thread Greg Kroah-Hartman
From: Xin Long commit 6f07e5f06c8712acc423485f657799fc8e11e56c upstream. Syzbot reported the following crash: BUG: KMSAN: uninit-value in memchr+0xce/0x110 lib/string.c:961 memchr+0xce/0x110 lib/string.c:961 string_is_valid net/tipc/netlink_compat.c:176 [inline]

[PATCH 4.19 062/100] tipc: check link name with right length in tipc_nl_compat_link_set

2019-04-30 Thread Greg Kroah-Hartman
From: Xin Long commit 8c63bf9ab4be8b83bd8c34aacfd2f1d2c8901c8a upstream. A similar issue as fixed by Patch "tipc: check bearer name with right length in tipc_nl_compat_bearer_enable" was also found by syzbot in tipc_nl_compat_link_set(). The length to check with should be

Re: [PATCH 2/5] irqchip/renesas-irqc: Remove devm_kzalloc()/ioremap_nocache() error printing

2019-04-30 Thread Geert Uytterhoeven
Hi Sergei, On Tue, Apr 30, 2019 at 10:12 AM Sergei Shtylyov wrote: > On 29.04.2019 18:20, Geert Uytterhoeven wrote: > > There is no need to print a message if devm_kzalloc() or > > Just kzalloc() in this case. Thanks, silly copy-and-paste error. > > --- a/drivers/irqchip/irq-renesas-irqc.c

[PATCH 4.19 070/100] aio: use iocb_put() instead of open coding it

2019-04-30 Thread Greg Kroah-Hartman
From: Jens Axboe commit 71ebc6fef0f53459f37fb39e1466792232fa52ee upstream. Replace the percpu_ref_put() + kmem_cache_free() with a call to iocb_put() instead. Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe Cc: Guenter Roeck Signed-off-by: Greg Kroah-Hartman --- fs/aio.c |3

[PATCH 4.19 065/100] rxrpc: fix race condition in rxrpc_input_packet()

2019-04-30 Thread Greg Kroah-Hartman
From: Eric Dumazet commit 032be5f19a94de51093851757089133dcc1e92aa upstream. After commit 5271953cad31 ("rxrpc: Use the UDP encap_rcv hook"), rxrpc_input_packet() is directly called from lockless UDP receive path, under rcu_read_lock() protection. It must therefore use RCU rules : -

[PATCH 4.19 067/100] aio: use assigned completion handler

2019-04-30 Thread Greg Kroah-Hartman
From: Jens Axboe commit bc9bff61624ac33b7c95861abea1af24ee7a94fc upstream. We know this is a read/write request, but in preparation for having different kinds of those, ensure that we call the assigned handler instead of assuming it's aio_complete_rq(). Reviewed-by: Christoph Hellwig

[PATCH 4.19 072/100] aio: abstract out io_event filler helper

2019-04-30 Thread Greg Kroah-Hartman
From: Jens Axboe commit 875736bb3f3ded168469f6a14df7a938416a99d5 upstream. Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe Cc: Guenter Roeck Signed-off-by: Greg Kroah-Hartman --- fs/aio.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) --- a/fs/aio.c +++

[PATCH 4.19 074/100] aio: simplify - and fix - fget/fput for io_submit()

2019-04-30 Thread Greg Kroah-Hartman
From: Linus Torvalds commit 84c4e1f89fefe70554da0ab33be72c9be7994379 upstream. Al Viro root-caused a race where the IOCB_CMD_POLL handling of fget/fput() could cause us to access the file pointer after it had already been freed: "In more details - normally IOCB_CMD_POLL handling looks so:

[PATCH 4.19 079/100] Fix aio_poll() races

2019-04-30 Thread Greg Kroah-Hartman
From: Al Viro commit af5c72b1fc7a00aa484e90b0c4e0eeb582545634 upstream. aio_poll() has to cope with several unpleasant problems: * requests that might stay around indefinitely need to be made visible for io_cancel(2); that must not be done to a request already completed, though.

[PATCH 4.19 085/100] ipv4: set the tcp_min_rtt_wlen range from 0 to one day

2019-04-30 Thread Greg Kroah-Hartman
From: ZhangXiaoxu [ Upstream commit 19fad20d15a6494f47f85d869f00b11343ee5c78 ] There is a UBSAN report as below: UBSAN: Undefined behaviour in net/ipv4/tcp_input.c:2877:56 signed integer overflow: 2147483647 * 1000 cannot be represented in type 'int' CPU: 3 PID: 0 Comm: swapper/3 Not tainted

[PATCH 4.19 077/100] aio: keep io_event in aio_kiocb

2019-04-30 Thread Greg Kroah-Hartman
From: Al Viro commit a9339b7855094ba11a97e8822ae038135e879e79 upstream. We want to separate forming the resulting io_event from putting it into the ring buffer. Signed-off-by: Al Viro Cc: Guenter Roeck Signed-off-by: Greg Kroah-Hartman --- fs/aio.c | 31 +--

[PATCH 4.19 082/100] mm: Fix warning in insert_pfn()

2019-04-30 Thread Greg Kroah-Hartman
From: Jan Kara commit f2c57d91b0d96aa13ccff4e3b178038f17b00658 upstream. In DAX mode a write pagefault can race with write(2) in the following way: CPU0CPU1 write fault for mapped zero page (hole) dax_iomap_rw() iomap_apply()

[PATCH 4.19 081/100] x86/retpolines: Disable switch jump tables when retpolines are enabled

2019-04-30 Thread Greg Kroah-Hartman
From: Daniel Borkmann commit a9d57ef15cbe327fe54416dd194ee0ea66ae53a4 upstream. Commit ce02ef06fcf7 ("x86, retpolines: Raise limit for generating indirect calls from switch-case") raised the limit under retpolines to 20 switch cases where gcc would only then start to emit jump tables, and

Re: [PATCH 2/4] rtc: digicolor: set range

2019-04-30 Thread Alexandre Belloni
On 30/04/2019 14:36:24+0300, Baruch Siach wrote: > Hi Alexandre, > > On Tue, Apr 30 2019, Alexandre Belloni wrote: > > > While the range of REFERENCE + TIME is actually 33 bits, the counter > > itself (TIME) is a 32-bits seconds counter. > > > > Signed-off-by: Alexandre Belloni > > --- > >

[PATCH 4.19 048/100] Revert "drm/i915/fbdev: Actually configure untiled displays"

2019-04-30 Thread Greg Kroah-Hartman
From: Dave Airlie commit 9fa246256e09dc30820524401cdbeeaadee94025 upstream. This reverts commit d179b88deb3bf6fed4991a31fd6f0f2cad21fab5. This commit is documented to break userspace X.org modesetting driver in certain configurations. The X.org modesetting userspace driver is broken. No

[PATCH 4.19 054/100] fs/proc/proc_sysctl.c: Fix a NULL pointer dereference

2019-04-30 Thread Greg Kroah-Hartman
From: YueHaibing commit 89189557b47b35683a27c80ee78aef18248eefb4 upstream. Syzkaller report this: sysctl could not get directory: /net//bridge -12 kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: [#1]

[PATCH 4.19 049/100] drm/vc4: Fix compilation error reported by kbuild test bot

2019-04-30 Thread Greg Kroah-Hartman
From: Maarten Lankhorst commit 462ce5d963f18b71c63f6b7730a35a2ee5273540 upstream. A pointer to crtc was missing, resulting in the following build error: drivers/gpu/drm/vc4/vc4_crtc.c:1045:44: sparse: sparse: incorrect type in argument 1 (different base types)

[PATCH 4.19 084/100] ipv4: add sanity checks in ipv4_link_failure()

2019-04-30 Thread Greg Kroah-Hartman
From: Eric Dumazet [ Upstream commit 20ff83f10f113c88d0bb74589389b05250994c16 ] Before calling __ip_options_compile(), we need to ensure the network header is a an IPv4 one, and that it is already pulled in skb->head. RAW sockets going through a tunnel can end up calling ipv4_link_failure()

[PATCH 4.19 050/100] USB: Add new USB LPM helpers

2019-04-30 Thread Greg Kroah-Hartman
From: Kai-Heng Feng commit 7529b2574a7aaf902f1f8159fbc2a7caa74be559 upstream. Use new helpers to make LPM enabling/disabling more clear. This is a preparation to subsequent patch. Signed-off-by: Kai-Heng Feng Cc: stable # after much soaking Signed-off-by: Greg Kroah-Hartman ---

[PATCH 4.19 053/100] intel_th: gth: Fix an off-by-one in output unassigning

2019-04-30 Thread Greg Kroah-Hartman
From: Alexander Shishkin commit 91d3f8a629849968dc91d6ce54f2d46abf4feb7f upstream. Commit 9ed3f3c3 ("intel_th: Don't reference unassigned outputs") fixes a NULL dereference for all masters except the last one ("256+"), which keeps the stale pointer after the output driver had been

[PATCH 5.0 01/89] netfilter: nf_tables: bogus EBUSY when deleting set after flush

2019-04-30 Thread Greg Kroah-Hartman
[ Upstream commit 273fe3f1006ea5ebc63d6729e43e8e45e32b256a ] Set deletion after flush coming in the same batch results in EBUSY. Add set use counter to track the number of references to this set from rules. We cannot rely on the list of bindings for this since such list is still populated from

[PATCH 4.19 096/100] mlxsw: spectrum: Put MC TCs into DWRR mode

2019-04-30 Thread Greg Kroah-Hartman
From: Petr Machata [ Upstream commit f476b3f809fa02f47af6333ed63715058c3fc348 ] Both Spectrum-1 and Spectrum-2 chips are currently configured such that pairs of TC n (which is used for UC traffic) and TC n+8 (which is used for MC traffic) are feeding into the same subgroup. Strict

[PATCH 4.19 092/100] stmmac: pci: Adjust IOT2000 matching

2019-04-30 Thread Greg Kroah-Hartman
From: Su Bao Cheng [ Upstream commit e0c1d14a1a3211dccf0540a6703ffbd5d2a75bdb ] Since there are more IOT2040 variants with identical hardware but different asset tags, the asset tag matching should be adjusted to support them. For the board name "SIMATIC IOT2000", currently there are 2 types

[PATCH 4.19 045/100] ARM: 8857/1: efi: enable CP15 DMB instructions before cleaning the cache

2019-04-30 Thread Greg Kroah-Hartman
From: Ard Biesheuvel commit e17b1af96b2afc38e684aa2f1033387e2ed10029 upstream. The EFI stub is entered with the caches and MMU enabled by the firmware, and once the stub is ready to hand over to the decompressor, we clean and disable the caches. The cache clean routines use CP15 barrier

[PATCH 4.19 100/100] net/tls: dont leak IV and record seq when offload fails

2019-04-30 Thread Greg Kroah-Hartman
From: Jakub Kicinski [ Upstream commit 12c7686111326148b4b5db189130522a4ad1be4a ] When device refuses the offload in tls_set_device_offload_rx() it calls tls_sw_free_resources_rx() to clean up software context state. Unfortunately, tls_sw_free_resources_rx() does not free all the state

[PATCH 4.19 099/100] net/tls: avoid potential deadlock in tls_set_device_offload_rx()

2019-04-30 Thread Greg Kroah-Hartman
From: Jakub Kicinski [ Upstream commit 62ef81d5632634d5e310ed25b9b940b2b6612b46 ] If device supports offload, but offload fails tls_set_device_offload_rx() will call tls_sw_free_resources_rx() which (unhelpfully) releases and reacquires the socket lock. For a small fix release and reacquire

[PATCH 4.19 090/100] net: stmmac: move stmmac_check_ether_addr() to driver probe

2019-04-30 Thread Greg Kroah-Hartman
From: Vinod Koul [ Upstream commit b561af36b1841088552464cdc3f6371d92f17710 ] stmmac_check_ether_addr() checks the MAC address and assigns one in driver open(). In many cases when we create slave netdevice, the dev addr is inherited from master but the master dev addr maybe NULL at that time,

[PATCH 4.19 093/100] team: fix possible recursive locking when add slaves

2019-04-30 Thread Greg Kroah-Hartman
From: Hangbin Liu [ Upstream commit 925b0c841e066b488cc3a60272472b2c56300704 ] If we add a bond device which is already the master of the team interface, we will hold the team->lock in team_add_slave() first and then request the lock in team_set_mac_address() again. The functions are called

[PATCH 4.19 095/100] mlxsw: pci: Reincrease PCI reset timeout

2019-04-30 Thread Greg Kroah-Hartman
From: Ido Schimmel [ Upstream commit 1ab3030193d25878b3b1409060e1e0a879800c95 ] During driver initialization the driver sends a reset to the device and waits for the firmware to signal that it is ready to continue. Commit d2f372ba0914 ("mlxsw: pci: Increase PCI SW reset timeout") increased the

[PATCH 5.0 02/89] netfilter: nf_tables: bogus EBUSY in helper removal from transaction

2019-04-30 Thread Greg Kroah-Hartman
[ Upstream commit 8ffcd32f64633926163cdd07a7d295c500a947d1 ] Proper use counter updates when activating and deactivating the object, otherwise, this hits bogus EBUSY error. Fixes: cd5125d8f518 ("netfilter: nf_tables: split set destruction in deactivate and destroy phase") Reported-by: Laura

Re: [PATCH v2 1/2] livepatch: Remove duplicate warning about missing reliable stacktrace support

2019-04-30 Thread Kamalesh Babulal
On Tue, Apr 30, 2019 at 11:10:48AM +0200, Petr Mladek wrote: > WARN_ON_ONCE() could not be called safely under rq lock because > of console deadlock issues. Fortunately, there is another check > for the reliable stacktrace support in klp_enable_patch(). > > Signed-off-by: Petr Mladek

[PATCH 5.0 07/89] block, bfq: fix use after free in bfq_bfqq_expire

2019-04-30 Thread Greg Kroah-Hartman
[ Upstream commit eed47d19d9362bdd958e4ab56af480b9dbf6b2b6 ] The function bfq_bfqq_expire() invokes the function __bfq_bfqq_expire(), and the latter may free the in-service bfq-queue. If this happens, then no other instruction of bfq_bfqq_expire() must be executed, or a use-after-free will occur.

[PATCH 5.0 09/89] cifs: fix page reference leak with readv/writev

2019-04-30 Thread Greg Kroah-Hartman
From: Jérôme Glisse commit 13f5938d8264b5501368523c4513ff26608a33e8 upstream. CIFS can leak pages reference gotten through GUP (get_user_pages*() through iov_iter_get_pages()). This happen if cifs_send_async_read() or cifs_write_from_iter() calls fail from within __cifs_readv() and

[PATCH 5.0 20/89] mm: do not boost watermarks to avoid fragmentation for the DISCONTIG memory model

2019-04-30 Thread Greg Kroah-Hartman
From: Mel Gorman commit 24512228b7a3f412b5a51f189df302616b021c33 upstream. Mikulas Patocka reported that commit 1c30844d2dfe ("mm: reclaim small amounts of memory when an external fragmentation event occurs") "broke" memory management on parisc. The machine is not NUMA but the DISCONTIG model

[PATCH 5.0 21/89] arm64: mm: Ensure tail of unaligned initrd is reserved

2019-04-30 Thread Greg Kroah-Hartman
From: Bjorn Andersson commit d4d18e3ec6091843f607e8929a56723e28f393a6 upstream. In the event that the start address of the initrd is not aligned, but has an aligned size, the base + size will not cover the entire initrd image and there is a chance that the kernel will corrupt the tail of the

[PATCH 5.0 11/89] tracing: Fix a memory leak by early error exit in trace_pid_write()

2019-04-30 Thread Greg Kroah-Hartman
From: Wenwen Wang commit 91862cc7867bba4ee5c8fcf0ca2f1d30427b6129 upstream. In trace_pid_write(), the buffer for trace parser is allocated through kmalloc() in trace_parser_get_init(). Later on, after the buffer is used, it is then freed through kfree() in trace_parser_put(). However, it is

[PATCH 5.0 29/89] ceph: fix ci->i_head_snapc leak

2019-04-30 Thread Greg Kroah-Hartman
From: Yan, Zheng commit 37659182bff1eeaaeadcfc8f853c6d2b6dbc3f47 upstream. We missed two places that i_wrbuffer_ref_head, i_wr_ref, i_dirty_caps and i_flushing_caps may change. When they are all zeros, we should free i_head_snapc. Cc: sta...@vger.kernel.org Link:

[PATCH 5.0 23/89] RDMA/mlx5: Do not allow the user to write to the clock page

2019-04-30 Thread Greg Kroah-Hartman
From: Jason Gunthorpe commit c660133c339f9ab684fdf568c0d51b9ae5e86002 upstream. The intent of this VMA was to be read-only from user space, but the VM_MAYWRITE masking was missed, so mprotect could make it writable. Cc: sta...@vger.kernel.org Fixes: 5c99eaecb1fc ("IB/mlx5: Mmap the HCA's clock

[PATCH 5.0 25/89] RDMA/ucontext: Fix regression with disassociate

2019-04-30 Thread Greg Kroah-Hartman
From: Jason Gunthorpe commit 67f269b37f9b4d52c5e7f97acea26c0852e9b8a1 upstream. When this code was consolidated the intention was that the VMA would become backed by anonymous zero pages after the zap_vma_pte - however this very subtly relied on setting the vm_ops = NULL and clearing the

Re: Question about sched_setaffinity()

2019-04-30 Thread Peter Zijlstra
On Tue, Apr 30, 2019 at 03:51:30AM -0700, Paul E. McKenney wrote: > > Then I'm not entirely sure how we can return 0 and not run on the > > expected CPU. If we look at __set_cpus_allowed_ptr(), the only paths out > > to 0 are: > > > > - if the mask didn't change > > - if we already run inside

[PATCH 5.0 30/89] nfsd: Dont release the callback slot unless it was actually held

2019-04-30 Thread Greg Kroah-Hartman
From: Trond Myklebust commit e6abc8caa6deb14be2a206253f7e1c5e37e9515b upstream. If there are multiple callbacks queued, waiting for the callback slot when the callback gets shut down, then they all currently end up acting as if they hold the slot, and call nfsd4_cb_sequence_done() resulting in

[PATCH 5.0 35/89] Input: synaptics-rmi4 - write config register values to the right offset

2019-04-30 Thread Greg Kroah-Hartman
From: Lucas Stach commit 3a349763cf11e63534b8f2d302f2d0c790566497 upstream. Currently any changed config register values don't take effect, as the function to write them back is called with the wrong register offset. Fixes: ff8f83708b3e (Input: synaptics-rmi4 - add support for 2D

[PATCH 5.0 13/89] crypto: xts - Fix atomic sleep when walking skcipher

2019-04-30 Thread Greg Kroah-Hartman
From: Herbert Xu commit 44427c0fbc09b448b22410978a4ef6ee37599d25 upstream. When we perform a walk in the completion function, we need to ensure that it is atomic. Reported-by: syzbot+6f72c20560060c98b...@syzkaller.appspotmail.com Fixes: 78105c7e769b ("crypto: xts - Drop use of auxiliary

[PATCH 5.0 33/89] sunrpc: dont mark uninitialised items as VALID.

2019-04-30 Thread Greg Kroah-Hartman
From: NeilBrown commit d58431eacb226222430940134d97bfd72f292fcd upstream. A recent commit added a call to cache_fresh_locked() when an expired item was found. The call sets the CACHE_VALID flag, so it is important that the item actually is valid. There are two ways it could be valid: 1/ If

[PATCH 5.0 37/89] dmaengine: sh: rcar-dmac: With cyclic DMA residue 0 is valid

2019-04-30 Thread Greg Kroah-Hartman
From: Dirk Behme commit 907bd68a2edc491849e2fdcfe52c4596627bca94 upstream. Having a cyclic DMA, a residue 0 is not an indication of a completed DMA. In case of cyclic DMA make sure that dma_set_residue() is called and with this a residue of 0 is forwarded correctly to the caller. Fixes:

[PATCH 5.0 12/89] tracing: Fix buffer_ref pipe ops

2019-04-30 Thread Greg Kroah-Hartman
From: Jann Horn commit b987222654f84f7b4ca95b3a55eca784cb30235b upstream. This fixes multiple issues in buffer_pipe_buf_ops: - The ->steal() handler must not return zero unless the pipe buffer has the only reference to the page. But generic_pipe_buf_steal() assumes that every reference

[PATCH 5.0 15/89] gpio: eic: sprd: Fix incorrect irq type setting for the sync EIC

2019-04-30 Thread Greg Kroah-Hartman
From: Baolin Wang commit 102bbe34b31c9159e714432afd64458f6f3876d7 upstream. When setting sync EIC as IRQ_TYPE_EDGE_BOTH type, we missed to set the SPRD_EIC_SYNC_INTMODE register to 0, which means detecting edge signals. Thus this patch fixes the issue. Fixes: 25518e024e3a ("gpio: Add

[PATCH 5.0 43/89] drm/ttm: fix re-init of global structures

2019-04-30 Thread Greg Kroah-Hartman
From: Christian König commit bd4264112f93045704731850c5e4d85db981cd85 upstream. When a driver unloads without unloading TTM we don't correctly clear the global structures leading to errors on re-init. Next step should probably be to remove the global structures and kobjs all together, but this

[PATCH 5.0 57/89] netfilter: ebtables: CONFIG_COMPAT: drop a bogus WARN_ON

2019-04-30 Thread Greg Kroah-Hartman
From: Florian Westphal commit 7caa56f006e9d712b44f27b32520c66420d5cbc6 upstream. It means userspace gave us a ruleset where there is some other data after the ebtables target but before the beginning of the next rule. Fixes: 81e675c227ec ("netfilter: ebtables: add CONFIG_COMPAT support")

[PATCH 5.0 44/89] Revert "drm/i915/fbdev: Actually configure untiled displays"

2019-04-30 Thread Greg Kroah-Hartman
From: Dave Airlie commit 9fa246256e09dc30820524401cdbeeaadee94025 upstream. This reverts commit d179b88deb3bf6fed4991a31fd6f0f2cad21fab5. This commit is documented to break userspace X.org modesetting driver in certain configurations. The X.org modesetting userspace driver is broken. No

[PATCH 5.0 46/89] USB: Add new USB LPM helpers

2019-04-30 Thread Greg Kroah-Hartman
From: Kai-Heng Feng commit 7529b2574a7aaf902f1f8159fbc2a7caa74be559 upstream. Use new helpers to make LPM enabling/disabling more clear. This is a preparation to subsequent patch. Signed-off-by: Kai-Heng Feng Cc: stable # after much soaking Signed-off-by: Greg Kroah-Hartman ---

[PATCH 5.0 48/89] ext4: fix some error pointer dereferences

2019-04-30 Thread Greg Kroah-Hartman
From: Dan Carpenter commit 7159a986b4202343f6cca3bb8079ecace5816fd6 upstream. We can't pass error pointers to brelse(). Fixes: fb265c9cb49e ("ext4: add ext4_sb_bread() to disambiguate ENOMEM cases") Signed-off-by: Dan Carpenter Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara

[PATCH 5.0 60/89] tipc: check link name with right length in tipc_nl_compat_link_set

2019-04-30 Thread Greg Kroah-Hartman
From: Xin Long commit 8c63bf9ab4be8b83bd8c34aacfd2f1d2c8901c8a upstream. A similar issue as fixed by Patch "tipc: check bearer name with right length in tipc_nl_compat_bearer_enable" was also found by syzbot in tipc_nl_compat_link_set(). The length to check with should be

[PATCH 5.0 63/89] rxrpc: fix race condition in rxrpc_input_packet()

2019-04-30 Thread Greg Kroah-Hartman
From: Eric Dumazet commit 032be5f19a94de51093851757089133dcc1e92aa upstream. After commit 5271953cad31 ("rxrpc: Use the UDP encap_rcv hook"), rxrpc_input_packet() is directly called from lockless UDP receive path, under rcu_read_lock() protection. It must therefore use RCU rules : -

[PATCH 5.0 66/89] aio: keep io_event in aio_kiocb

2019-04-30 Thread Greg Kroah-Hartman
From: Al Viro commit a9339b7855094ba11a97e8822ae038135e879e79 upstream. We want to separate forming the resulting io_event from putting it into the ring buffer. Signed-off-by: Al Viro Cc: Guenter Roeck Signed-off-by: Greg Kroah-Hartman --- fs/aio.c | 31 +--

Re: [PATCH v1 1/2] Add polling support to pidfd

2019-04-30 Thread Oleg Nesterov
On 04/29, Joel Fernandes wrote: > > On Mon, Apr 29, 2019 at 04:20:30PM +0200, Oleg Nesterov wrote: > > On 04/29, Joel Fernandes wrote: > > > > > > However, in your code above, it is avoided because we get: > > > > > > Task A (poller) Task B (exiting task being polled) > > >

[PATCH 5.0 49/89] loop: do not print warn message if partition scan is successful

2019-04-30 Thread Greg Kroah-Hartman
From: Dongli Zhang commit 40853d6fc619a6fd3d3177c3973a2eac9b598a80 upstream. Do not print warn message when the partition scan returns 0. Fixes: d57f3374ba48 ("loop: Move special partition reread handling in loop_clr_fd()") Signed-off-by: Dongli Zhang Reviewed-by: Jan Kara Signed-off-by:

[PATCH 5.0 68/89] Fix aio_poll() races

2019-04-30 Thread Greg Kroah-Hartman
From: Al Viro commit af5c72b1fc7a00aa484e90b0c4e0eeb582545634 upstream. aio_poll() has to cope with several unpleasant problems: * requests that might stay around indefinitely need to be made visible for io_cancel(2); that must not be done to a request already completed, though.

[PATCH 5.0 73/89] ipv4: set the tcp_min_rtt_wlen range from 0 to one day

2019-04-30 Thread Greg Kroah-Hartman
From: ZhangXiaoxu [ Upstream commit 19fad20d15a6494f47f85d869f00b11343ee5c78 ] There is a UBSAN report as below: UBSAN: Undefined behaviour in net/ipv4/tcp_input.c:2877:56 signed integer overflow: 2147483647 * 1000 cannot be represented in type 'int' CPU: 3 PID: 0 Comm: swapper/3 Not tainted

[PATCH 5.0 82/89] net: socionext: replace napi_alloc_frag with the netdev variant on init

2019-04-30 Thread Greg Kroah-Hartman
From: Ilias Apalodimas [ Upstream commit ffbf9870dcf1342592a1a26f4cf70bda39046134 ] The netdev variant is usable on any context since it disables interrupts. The napi variant of the call should only be used within softirq context. Replace napi_alloc_frag on driver init with the correct

[PATCH 5.0 54/89] sched/deadline: Correctly handle active 0-lag timers

2019-04-30 Thread Greg Kroah-Hartman
From: luca abeni commit 1b02cd6a2d7f3e2a6a5262887d2cb2912083e42f upstream. syzbot reported the following warning: [ ] WARNING: CPU: 4 PID: 17089 at kernel/sched/deadline.c:255 task_non_contending+0xae0/0x1950 line 255 of deadline.c is:

[PATCH 5.0 52/89] workqueue: Try to catch flush_work() without INIT_WORK().

2019-04-30 Thread Greg Kroah-Hartman
From: Tetsuo Handa commit 4d43d395fed124631ca02356c711facb90185175 upstream. syzbot found a flush_work() caller who forgot to call INIT_WORK() because that work_struct was allocated by kzalloc() [1]. But the message INFO: trying to register non-static key. the code is fine but needs

[PATCH 5.0 87/89] net/mlx5e: Fix use-after-free after xdp_return_frame

2019-04-30 Thread Greg Kroah-Hartman
From: Maxim Mikityanskiy [ Upstream commit 12fc512f5741443a03adde2ead20724da8ad550a ] xdp_return_frame releases the frame. It leads to releasing the page, so it's not allowed to access xdpi.xdpf->len after that, because xdpi.xdpf is at xdp->data_hard_start after convert_to_xdp_frame. This patch

[PATCH 5.0 88/89] net/tls: avoid potential deadlock in tls_set_device_offload_rx()

2019-04-30 Thread Greg Kroah-Hartman
From: Jakub Kicinski [ Upstream commit 62ef81d5632634d5e310ed25b9b940b2b6612b46 ] If device supports offload, but offload fails tls_set_device_offload_rx() will call tls_sw_free_resources_rx() which (unhelpfully) releases and reacquires the socket lock. For a small fix release and reacquire

[PATCH 5.0 85/89] mlxsw: spectrum: Put MC TCs into DWRR mode

2019-04-30 Thread Greg Kroah-Hartman
From: Petr Machata [ Upstream commit f476b3f809fa02f47af6333ed63715058c3fc348 ] Both Spectrum-1 and Spectrum-2 chips are currently configured such that pairs of TC n (which is used for UC traffic) and TC n+8 (which is used for MC traffic) are feeding into the same subgroup. Strict

[PATCH 5.0 55/89] mac80211_hwsim: calculate if_combination.max_interfaces

2019-04-30 Thread Greg Kroah-Hartman
From: Johannes Berg commit 45fcef8b727b6f171bc5443e8153181a367d7a15 upstream. If we just set this to 2048, and have multiple limits you can select from, the total number might run over and cause a warning in cfg80211. This doesn't make sense, so we just calculate the total max_interfaces now.

[PATCH 5.0 89/89] net/tls: dont leak IV and record seq when offload fails

2019-04-30 Thread Greg Kroah-Hartman
From: Jakub Kicinski [ Upstream commit 12c7686111326148b4b5db189130522a4ad1be4a ] When device refuses the offload in tls_set_device_offload_rx() it calls tls_sw_free_resources_rx() to clean up software context state. Unfortunately, tls_sw_free_resources_rx() does not free all the state

[PATCH 5.0 86/89] net/mlx5e: Fix the max MTU check in case of XDP

2019-04-30 Thread Greg Kroah-Hartman
From: Maxim Mikityanskiy [ Upstream commit d460c2718906252a2a69bc6f89b537071f792e6e ] MLX5E_XDP_MAX_MTU was calculated incorrectly. It didn't account for NET_IP_ALIGN and MLX5E_HW2SW_MTU, and it also misused MLX5_SKB_FRAG_SZ. This commit fixes the calculations and adds a brief explanation for

[PATCH 5.0 56/89] NFS: Forbid setting AF_INET6 to "struct sockaddr_in"->sin_family.

2019-04-30 Thread Greg Kroah-Hartman
From: Tetsuo Handa commit 7c2bd9a39845bfb6d72ddb55ce737650271f6f96 upstream. syzbot is reporting uninitialized value at rpc_sockaddr2uaddr() [1]. This is because syzbot is setting AF_INET6 to "struct sockaddr_in"->sin_family (which is embedded into user-visible "struct nfs_mount_data"

[PATCH 5.0 47/89] USB: Consolidate LPM checks to avoid enabling LPM twice

2019-04-30 Thread Greg Kroah-Hartman
From: Kai-Heng Feng commit d7a6c0ce8d26412903c7981503bad9e1cc7c45d2 upstream. USB Bluetooth controller QCA ROME (0cf3:e007) sometimes stops working after S3: [ 165.110742] Bluetooth: hci0: using NVM file: qca/nvm_usb_0302.bin [ 168.432065] Bluetooth: hci0: Failed to send body at 4 of 1953

[PATCH 5.0 84/89] mlxsw: pci: Reincrease PCI reset timeout

2019-04-30 Thread Greg Kroah-Hartman
From: Ido Schimmel [ Upstream commit 1ab3030193d25878b3b1409060e1e0a879800c95 ] During driver initialization the driver sends a reset to the device and waits for the firmware to signal that it is ready to continue. Commit d2f372ba0914 ("mlxsw: pci: Increase PCI SW reset timeout") increased the

[PATCH 5.0 53/89] binder: fix handling of misaligned binder object

2019-04-30 Thread Greg Kroah-Hartman
From: Todd Kjos commit 26528be6720bb40bc8844e97ee73a37e530e9c5e upstream. Fixes crash found by syzbot: kernel BUG at drivers/android/binder_alloc.c:LINE! (2) Reported-and-tested-by: syzbot+55de1eb4975dec156...@syzkaller.appspotmail.com Signed-off-by: Todd Kjos Reviewed-by: Joel Fernandes

[PATCH 5.0 79/89] net/tls: fix refcount adjustment in fallback

2019-04-30 Thread Greg Kroah-Hartman
From: Jakub Kicinski [ Upstream commit 9188d5ca454fd665145904267e726e9e8d122f5c ] Unlike atomic_add(), refcount_add() does not deal well with a negative argument. TLS fallback code reallocates the skb and is very likely to shrink the truesize, leading to: [ 189.513254] WARNING: CPU: 5 PID: 0

[PATCH 5.0 51/89] slip: make slhc_free() silently accept an error pointer

2019-04-30 Thread Greg Kroah-Hartman
From: Linus Torvalds commit baf76f0c58aec435a3a864075b8f6d8ee5d1f17e upstream. This way, slhc_free() accepts what slhc_init() returns, whether that is an error or not. In particular, the pattern in sl_alloc_bufs() is slcomp = slhc_init(16, 16); ... slhc_free(slcomp);

[PATCH 5.0 78/89] net: stmmac: move stmmac_check_ether_addr() to driver probe

2019-04-30 Thread Greg Kroah-Hartman
From: Vinod Koul [ Upstream commit b561af36b1841088552464cdc3f6371d92f17710 ] stmmac_check_ether_addr() checks the MAC address and assigns one in driver open(). In many cases when we create slave netdevice, the dev addr is inherited from master but the master dev addr maybe NULL at that time,

[PATCH 5.0 81/89] team: fix possible recursive locking when add slaves

2019-04-30 Thread Greg Kroah-Hartman
From: Hangbin Liu [ Upstream commit 925b0c841e066b488cc3a60272472b2c56300704 ] If we add a bond device which is already the master of the team interface, we will hold the team->lock in team_add_slave() first and then request the lock in team_set_mac_address() again. The functions are called

[PATCH 5.0 80/89] stmmac: pci: Adjust IOT2000 matching

2019-04-30 Thread Greg Kroah-Hartman
From: Su Bao Cheng [ Upstream commit e0c1d14a1a3211dccf0540a6703ffbd5d2a75bdb ] Since there are more IOT2040 variants with identical hardware but different asset tags, the asset tag matching should be adjusted to support them. For the board name "SIMATIC IOT2000", currently there are 2 types

[PATCH 5.0 83/89] net/ncsi: handle overflow when incrementing mac address

2019-04-30 Thread Greg Kroah-Hartman
From: Tao Ren [ Upstream commit 1c5c12ee308aacf635c8819cd4baa3bd58f8a8b7 ] Previously BMC's MAC address is calculated by simply adding 1 to the last byte of network controller's MAC address, and it produces incorrect result when network controller's MAC address ends with 0xFF. The problem can

[PATCH 5.0 77/89] net/rose: fix unbound loop in rose_loopback_timer()

2019-04-30 Thread Greg Kroah-Hartman
From: Eric Dumazet [ Upstream commit 0453c682459583910d611a96de928f4442205493 ] This patch adds a limit on the number of skbs that fuzzers can queue into loopback_queue. 1000 packets for rose loopback seems more than enough. Then, since we now have multiple cpus in most linux hosts, we also

[PATCH 5.0 76/89] net: rds: exchange of 8K and 1M pool

2019-04-30 Thread Greg Kroah-Hartman
From: Zhu Yanjun [ Upstream commit 4b9fc7146249a6e0e3175d0acc033fdcd2bfcb17 ] Before the commit 490ea5967b0d ("RDS: IB: move FMR code to its own file"), when the dirty_count is greater than 9/10 of max_items of 8K pool, 1M pool is used, Vice versa. After the commit 490ea5967b0d ("RDS: IB: move

[PATCH 5.0 75/89] net/mlx5e: ethtool, Remove unsupported SFP EEPROM high pages query

2019-04-30 Thread Greg Kroah-Hartman
From: Erez Alfasi [ Upstream commit ace329f4ab3ba434be2adf618073c752d083b524 ] Querying EEPROM high pages data for SFP module is currently not supported by our driver and yet queried, resulting in invalid FW queries. Set the EEPROM ethtool data length to 256 for SFP module will limit the

[PATCH 5.0 70/89] x86/retpolines: Disable switch jump tables when retpolines are enabled

2019-04-30 Thread Greg Kroah-Hartman
From: Daniel Borkmann commit a9d57ef15cbe327fe54416dd194ee0ea66ae53a4 upstream. Commit ce02ef06fcf7 ("x86, retpolines: Raise limit for generating indirect calls from switch-case") raised the limit under retpolines to 20 switch cases where gcc would only then start to emit jump tables, and

[PATCH 5.0 50/89] tipc: handle the err returned from cmd header function

2019-04-30 Thread Greg Kroah-Hartman
From: Xin Long commit 2ac695d1d602ce00b12170242f58c3d3a8e36d04 upstream. Syzbot found a crash: BUG: KMSAN: uninit-value in tipc_nl_compat_name_table_dump+0x54f/0xcd0 net/tipc/netlink_compat.c:872 Call Trace: tipc_nl_compat_name_table_dump+0x54f/0xcd0 net/tipc/netlink_compat.c:872

[PATCH 5.0 62/89] net/rds: Check address length before reading address family

2019-04-30 Thread Greg Kroah-Hartman
From: Tetsuo Handa commit dd3ac9a684358b8c1d5c432ca8322aaf5e4f28ee upstream. syzbot is reporting uninitialized value at rds_connect() [1] and rds_bind() [2]. This is because syzbot is passing ulen == 0 whereas these functions expect that it is safe to access sockaddr->family field in order to

[PATCH 5.0 74/89] mlxsw: spectrum: Fix autoneg status in ethtool

2019-04-30 Thread Greg Kroah-Hartman
From: Amit Cohen [ Upstream commit 151f0dddbbfe4c35c9c5b64873115aafd436af9d ] If link is down and autoneg is set to on/off, the status in ethtool does not change. The reason is when the link is down the function returns with zero before changing autoneg value. Move the checking of link state

[PATCH 5.0 65/89] aio: fold lookup_kiocb() into its sole caller

2019-04-30 Thread Greg Kroah-Hartman
From: Al Viro commit 833f4154ed560232120bc475935ee1d6a20e159f upstream. Signed-off-by: Al Viro Cc: Guenter Roeck Signed-off-by: Greg Kroah-Hartman --- fs/aio.c | 29 +++-- 1 file changed, 7 insertions(+), 22 deletions(-) --- a/fs/aio.c +++ b/fs/aio.c @@ -2002,24

[PATCH 5.0 67/89] aio: store event at final iocb_put()

2019-04-30 Thread Greg Kroah-Hartman
From: Al Viro commit 2bb874c0d873d13bd9b9b9c6d7b7c4edab18c8b4 upstream. Instead of having aio_complete() set ->ki_res.{res,res2}, do that explicitly in its callers, drop the reference (as aio_complete() used to do) and delay the rest until the final iocb_put(). Signed-off-by: Al Viro Cc:

[PATCH 5.0 72/89] ipv4: add sanity checks in ipv4_link_failure()

2019-04-30 Thread Greg Kroah-Hartman
From: Eric Dumazet [ Upstream commit 20ff83f10f113c88d0bb74589389b05250994c16 ] Before calling __ip_options_compile(), we need to ensure the network header is a an IPv4 one, and that it is already pulled in skb->head. RAW sockets going through a tunnel can end up calling ipv4_link_failure()

[PATCH 5.0 61/89] net: netrom: Fix error cleanup path of nr_proto_init

2019-04-30 Thread Greg Kroah-Hartman
From: YueHaibing commit d3706566ae3d92677b932dd156157fd6c72534b1 upstream. Syzkaller report this: BUG: unable to handle kernel paging request at fbfff830524b PGD 237fe8067 P4D 237fe8067 PUD 237e64067 PMD 1c9716067 PTE 0 Oops: [#1] SMP KASAN PTI CPU: 1 PID: 4465 Comm: syz-executor.0

[PATCH 5.0 71/89] rdma: fix build errors on s390 and MIPS due to bad ZERO_PAGE use

2019-04-30 Thread Greg Kroah-Hartman
From: Linus Torvalds commit 6a5c5d26c4c6c3cc486fef0bf04ff9551132611b upstream. The parameter to ZERO_PAGE() was wrong, but since all architectures except for MIPS and s390 ignore it, it wasn't noticed until 0-day reported the build error. Fixes: 67f269b37f9b ("RDMA/ucontext: Fix regression

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