[PATCH 5.0 64/89] pin iocb through aio.

2019-04-30 Thread Greg Kroah-Hartman
From: Linus Torvalds commit b53119f13a04879c3bf502828d99d13726639ead upstream. aio_poll() is not the only case that needs file pinned; worse, while aio_read()/aio_write() can live without pinning iocb itself, the proof is rather brittle and can easily break on later changes. Signed-off-by:

[PATCH 5.0 58/89] 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 5.0 18/89] MIPS: scall64-o32: Fix indirect syscall number load

2019-04-30 Thread Greg Kroah-Hartman
From: Aurelien Jarno commit 79b4a9cf0e2ea8203ce777c8d5cfa86c71eae86e upstream. Commit 4c21b8fd8f14 (MIPS: seccomp: Handle indirect system calls (o32)) added indirect syscall detection for O32 processes running on MIPS64, but it did not work correctly for big endian kernel/processes. The reason

[PATCH 5.0 59/89] 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 5.0 19/89] trace: Fix preempt_enable_no_resched() abuse

2019-04-30 Thread Greg Kroah-Hartman
From: Peter Zijlstra commit d6097c9e4454adf1f8f2c9547c2fa6060d55d952 upstream. Unless the very next line is schedule(), or implies it, one must not use preempt_enable_no_resched(). It can cause a preemption to go missing and thereby cause arbitrary delays, breaking the PREEMPT=y invariant.

[PATCH 5.0 10/89] cifs: do not attempt cifs operation on smb2+ rename error

2019-04-30 Thread Greg Kroah-Hartman
From: Frank Sorenson commit 652727bbe1b17993636346716ae5867627793647 upstream. A path-based rename returning EBUSY will incorrectly try opening the file with a cifs (NT Create AndX) operation on an smb2+ mount, which causes the server to force a session close. If the mount is smb2+, skip the

[PATCH 5.0 42/89] drm/vc4: Fix memory leak during gpu reset.

2019-04-30 Thread Greg Kroah-Hartman
From: Maarten Lankhorst commit d08106796a78a4273e39e1bbdf538dc4334b2635 upstream. __drm_atomic_helper_crtc_destroy_state does not free memory, it only cleans it up. Fix this by calling the functions own destroy function. Fixes: 6d6e50039187 ("drm/vc4: Allocate the right amount of space for

[PATCH 5.0 45/89] 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 5.0 14/89] crypto: lrw - Fix atomic sleep when walking skcipher

2019-04-30 Thread Greg Kroah-Hartman
From: Herbert Xu commit b257b48cd5830c5b1d0c347eb281f9c28056f881 upstream. When we perform a walk in the completion function, we need to ensure that it is atomic. Fixes: ac3c8f36c31d ("crypto: lrw - Do not use auxiliary buffer") Cc: Signed-off-by: Herbert Xu Acked-by: Ondrej Mosnacek

[PATCH 5.0 17/89] lib/Kconfig.debug: fix build error without CONFIG_BLOCK

2019-04-30 Thread Greg Kroah-Hartman
From: YueHaibing commit ae3d6a323347940f0548bbb4b17f0bb2e9164169 upstream. If CONFIG_TEST_KMOD is set to M, while CONFIG_BLOCK is not set, XFS and BTRFS can not be compiled successly. Link: http://lkml.kernel.org/r/20190410075434.35220-1-yuehaib...@huawei.com Fixes: d9c6a72d6fa2 ("kmod: add

[PATCH 5.0 16/89] zram: pass down the bvec we need to read into in the work struct

2019-04-30 Thread Greg Kroah-Hartman
From: Jérôme Glisse commit e153abc0739ff77bd89c9ba1688cdb963464af97 upstream. When scheduling work item to read page we need to pass down the proper bvec struct which points to the page to read into. Before this patch it uses a randomly initialized bvec (only if PAGE_SIZE != 4096) which is

[PATCH 5.0 41/89] 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 5.0 39/89] dmaengine: mediatek-cqdma: fix wrong register usage in mtk_cqdma_start

2019-04-30 Thread Greg Kroah-Hartman
From: Shun-Chih Yu commit 5bb5c3a3ac102158b799bf5eda871223aa5e9c25 upstream. This patch fixes wrong register usage in the mtk_cqdma_start. The destination register should be MTK_CQDMA_DST2 instead. Fixes: b1f01e48df5a ("dmaengine: mediatek: Add MediaTek Command-Queue DMA controller for MT6765

[PATCH 5.0 34/89] perf/x86/intel: Update KBL Package C-state events to also include PC8/PC9/PC10 counters

2019-04-30 Thread Greg Kroah-Hartman
From: Harry Pan commit 82c99f7a81f28f8c1be5f701c8377d14c4075b10 upstream. Kaby Lake (and Coffee Lake) has PC8/PC9/PC10 residency counters. This patch updates the list of Kaby/Coffee Lake PMU event counters from the snb_cstates[] list of events to the hswult_cstates[] list of events, which

[PATCH 5.0 40/89] 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 5.0 38/89] dmaengine: sh: rcar-dmac: Fix glitch in dmaengine_tx_status

2019-04-30 Thread Greg Kroah-Hartman
From: Achim Dahlhoff commit 6e7da74775348d96e2d7efaf3f91410e18c481ef upstream. The tx_status poll in the rcar_dmac driver reads the status register which indicates which chunk is busy (DMACHCRB). Afterwards the point inside the chunk is read from DMATCRB. It is possible that the chunk has

[PATCH 5.0 36/89] 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 5.0 27/89] ceph: only use d_name directly when parent is locked

2019-04-30 Thread Greg Kroah-Hartman
From: Jeff Layton commit 1bcb344086f3ecf8d6705f6d708441baa823beb3 upstream. Ben reported tripping the BUG_ON in create_request_message during some performance testing. Analysis of the vmcore showed that the length of the r_dentry->d_name string changed after we allocated the buffer, but before

[PATCH 5.0 28/89] ceph: ensure d_name stability in ceph_dentry_hash()

2019-04-30 Thread Greg Kroah-Hartman
From: Jeff Layton commit 76a495d666e5043ffc315695f8241f5e94a98849 upstream. Take the d_lock here to ensure that d_name doesn't change. Cc: sta...@vger.kernel.org Signed-off-by: Jeff Layton Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov Signed-off-by: Greg Kroah-Hartman ---

[PATCH 5.0 31/89] nfsd: wake waiters blocked on file_lock before deleting it

2019-04-30 Thread Greg Kroah-Hartman
From: Jeff Layton commit 6aaafc43a4ecc5bc8a3f6a2811d5eddc996a97f3 upstream. After a blocked nfsd file_lock request is deleted, knfsd will send a callback to the client and then free the request. Commit 16306a61d3b7 ("fs/locks: always delete_block after waiting.") changed it such that

[PATCH 5.0 32/89] nfsd: wake blocked file lock waiters before sending callback

2019-04-30 Thread Greg Kroah-Hartman
From: Jeff Layton commit f456458e4d25a8962d0946891617c76cc3ff5fb9 upstream. When a blocked NFS lock is "awoken" we send a callback to the server and then wake any hosts waiting on it. If a client attempts to get a lock and then drops off the net, we could end up waiting for a long time until we

[PATCH 5.0 24/89] RDMA/mlx5: Use rdma_user_map_io for mapping BAR pages

2019-04-30 Thread Greg Kroah-Hartman
From: Jason Gunthorpe commit d5e560d3f72382ac4e3bfe4e0f0420e6a220b039 upstream. Since mlx5 supports device disassociate it must use this API for all BAR page mmaps, otherwise the pages can remain mapped after the device is unplugged causing a system crash. Cc: sta...@vger.kernel.org Fixes:

[PATCH 5.0 26/89] sched/numa: Fix a possible divide-by-zero

2019-04-30 Thread Greg Kroah-Hartman
From: Xie XiuQi commit a860fa7b96e1a1c974556327aa1aee852d434c21 upstream. sched_clock_cpu() may not be consistent between CPUs. If a task migrates to another CPU, then se.exec_start is set to that CPU's rq_clock_task() by update_stats_curr_start(). Specifically, the new value might be before

[PATCH 5.0 06/89] fs/proc/proc_sysctl.c: Fix a NULL pointer dereference

2019-04-30 Thread Greg Kroah-Hartman
[ Upstream commit 89189557b47b35683a27c80ee78aef18248eefb4 ] 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] SMP KASAN PTI

[PATCH 5.0 00/89] 5.0.11-stable review

2019-04-30 Thread Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.0.11 release. There are 89 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 Thu 02 May 2019 11:35:03 AM UTC. Anything

[PATCH 5.0 22/89] IB/rdmavt: Fix frwr memory registration

2019-04-30 Thread Greg Kroah-Hartman
From: Josh Collier commit 7c39f7f671d2acc0a1f39ebbbee4303ad499bbfa upstream. Current implementation was not properly handling frwr memory registrations. This was uncovered by commit 27f26cec761das ("xprtrdma: Plant XID in on-the-wire RDMA offset (FRWR)") in which xprtrdma, which is used for NFS

[PATCH 5.0 08/89] cifs: fix memory leak in SMB2_read

2019-04-30 Thread Greg Kroah-Hartman
[ Upstream commit 05fd5c2c61732152a6bddc318aae62d7e436629b ] Commit 088aaf17aa79300cab14dbee2569c58cfafd7d6e introduced a leak where if SMB2_read() returned an error we would return without freeing the request buffer. Cc: Stable Signed-off-by: Ronnie Sahlberg Reviewed-by: Pavel Shilovsky

[PATCH 5.0 05/89] ALSA: hda/realtek - Move to ACT_INIT state

2019-04-30 Thread Greg Kroah-Hartman
[ Upstream commit 8983eb602af511fc5822f5ff4a82074c68816fd9 ] It will be lose Mic JD state when Chrome OS boot and headset was plugged. Just Implement of reset combo jack JD verb for ACT_PRE_PROBE state. Intel test result was also failed. It test passed until changed the initial state to ACT_INIT.

[PATCH 4.19 094/100] net: hns: Fix WARNING when hns modules installed

2019-04-30 Thread Greg Kroah-Hartman
From: Jun Xiao Commit dfdf26babc98 upstream this patch need merge to 4.19.y stable kernel Fix Conflict:already fixed the confilct dfdf26babc98 with Yonglong Liu stable candidate:user cannot connect to the internet via hns dev by default setting without this patch we have already verified

[PATCH 5.0 03/89] intel_th: gth: Fix an off-by-one in output unassigning

2019-04-30 Thread Greg Kroah-Hartman
[ Upstream commit 91d3f8a629849968dc91d6ce54f2d46abf4feb7f ] 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 unassigned. Fix the off-by-one.

[PATCH 4.19 091/100] 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 4.19 089/100] 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 4.19 086/100] 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 04/89] powerpc/vdso32: fix CLOCK_MONOTONIC on PPC64

2019-04-30 Thread Greg Kroah-Hartman
[ Upstream commit dd9a994fc68d196a052b73747e3366c57d14a09e ] Commit b5b4453e7912 ("powerpc/vdso64: Fix CLOCK_MONOTONIC inconsistencies across Y2038") changed the type of wtom_clock_sec to s64 on PPC64. Therefore, VDSO32 needs to read it with a 4 bytes shift in order to retrieve the lower part of

[PATCH 4.19 080/100] x86, retpolines: Raise limit for generating indirect calls from switch-case

2019-04-30 Thread Greg Kroah-Hartman
From: Daniel Borkmann commit ce02ef06fcf7a399a6276adb83f37373d10cbbe1 upstream. >From networking side, there are numerous attempts to get rid of indirect calls in fast-path wherever feasible in order to avoid the cost of retpolines, for example, just to name a few: * 283c16a2dfd3 ("indirect

[PATCH 4.19 088/100] 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 4.19 051/100] 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 4.19 083/100] x86/fpu: Dont export __kernel_fpu_{begin,end}()

2019-04-30 Thread Greg Kroah-Hartman
From: Sebastian Andrzej Siewior commit 12209993e98c5fa1855c467f22a24e3d5b8be205 upstream. There is one user of __kernel_fpu_begin() and before invoking it, it invokes preempt_disable(). So it could invoke kernel_fpu_begin() right away. The 32bit version of arch_efi_call_virt_setup() and

[PATCH 4.19 052/100] 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 4.19 098/100] 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 4.19 087/100] 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 4.19 097/100] 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 4.19 076/100] 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 @@ -1992,24

[PATCH 4.19 064/100] 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 4.19 066/100] aio: clear IOCB_HIPRI

2019-04-30 Thread Greg Kroah-Hartman
From: Christoph Hellwig commit 154989e45fd8de9bfb52bbd6e5ea763e437e54c5 upstream. No one is going to poll for aio (yet), so we must clear the HIPRI flag, as we would otherwise send it down the poll queues, where no one will be polling for completions. Signed-off-by: Christoph Hellwig

Re: [PATCH v8 00/14] Add support for TISCI Interrupt controller drivers

2019-04-30 Thread Nishanth Menon
On 15:42-20190430, Lokesh Vutla wrote: [...] > Changes since v7: > - Rebased on top of latest master. > - Each patch has respective changes mentioned. > > Grygorii Strashko (1): > firmware: ti_sci: Add support to get TISCI handle using of_phandle > > Lokesh Vutla (1

[PATCH 4.19 073/100] aio: initialize kiocb private in case any filesystems expect it.

2019-04-30 Thread Greg Kroah-Hartman
From: Mike Marshall commit ec51f8ee1e63498e9f521ec0e5a6d04622bb2c67 upstream. A recent optimization had left private uninitialized. Fixes: 2bc4ca9bb600 ("aio: don't zero entire aio_kiocb aio_get_req()") Reviewed-by: Christoph Hellwig Signed-off-by: Mike Marshall Signed-off-by: Jens Axboe

[PATCH 4.19 069/100] aio: dont zero entire aio_kiocb aio_get_req()

2019-04-30 Thread Greg Kroah-Hartman
From: Jens Axboe commit 2bc4ca9bb600cbe36941da2b2a67189fc4302a04 upstream. It's 192 bytes, fairly substantial. Most items don't need to be cleared, especially not upfront. Clear the ones we do need to clear, and leave the other ones for setup when the iocb is prepared and submitted.

[PATCH 4.19 075/100] pin iocb through aio.

2019-04-30 Thread Greg Kroah-Hartman
From: Linus Torvalds commit b53119f13a04879c3bf502828d99d13726639ead upstream. aio_poll() is not the only case that needs file pinned; worse, while aio_read()/aio_write() can live without pinning iocb itself, the proof is rather brittle and can easily break on later changes. Signed-off-by:

[PATCH 4.19 063/100] 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 4.19 078/100] 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 4.19 071/100] aio: split out iocb copy from io_submit_one()

2019-04-30 Thread Greg Kroah-Hartman
From: Jens Axboe commit 88a6f18b950e2e4dce57d31daa151105f4f3dcff upstream. In preparation of handing in iocbs in a different fashion as well. Also make it clear that the iocb being passed in isn't modified, by marking it const throughout. Reviewed-by: Christoph Hellwig Signed-off-by: Jens

[PATCH 4.19 047/100] drm/vc4: Fix memory leak during gpu reset.

2019-04-30 Thread Greg Kroah-Hartman
From: Maarten Lankhorst commit d08106796a78a4273e39e1bbdf538dc4334b2635 upstream. __drm_atomic_helper_crtc_destroy_state does not free memory, it only cleans it up. Fix this by calling the functions own destroy function. Fixes: 6d6e50039187 ("drm/vc4: Allocate the right amount of space for

[PATCH 4.19 068/100] aio: separate out ring reservation from req allocation

2019-04-30 Thread Greg Kroah-Hartman
From: Christoph Hellwig commit 432c79978c33ecef91b1b04cea6936c20810da29 upstream. This is in preparation for certain types of IO not needing a ring reserveration. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe Cc: Guenter Roeck Signed-off-by: Greg Kroah-Hartman --- fs/aio.c |

[PATCH 4.19 057/100] 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 4.19 058/100] 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 4.19 056/100] 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 4.19 016/100] loop: do not print warn message if partition scan is successful

2019-04-30 Thread Greg Kroah-Hartman
[ Upstream commit 40853d6fc619a6fd3d3177c3973a2eac9b598a80 ] 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: Jens Axboe

[PATCH 4.19 007/100] netfilter: nft_compat: dont use refcount_inc on newly allocated entry

2019-04-30 Thread Greg Kroah-Hartman
[ Upstream commit 947e492c0fc2132ae5fca081a9c2952ccaab0404 ] When I moved the refcount to refcount_t type I missed the fact that refcount_inc() will result in use-after-free warning with CONFIG_REFCOUNT_FULL=y builds. The correct fix would be to init the reference count to 1 at allocation time,

[PATCH 4.19 036/100] ceph: ensure d_name stability in ceph_dentry_hash()

2019-04-30 Thread Greg Kroah-Hartman
From: Jeff Layton commit 76a495d666e5043ffc315695f8241f5e94a98849 upstream. Take the d_lock here to ensure that d_name doesn't change. Cc: sta...@vger.kernel.org Signed-off-by: Jeff Layton Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov Signed-off-by: Greg Kroah-Hartman ---

[PATCH 4.19 035/100] ceph: only use d_name directly when parent is locked

2019-04-30 Thread Greg Kroah-Hartman
From: Jeff Layton commit 1bcb344086f3ecf8d6705f6d708441baa823beb3 upstream. Ben reported tripping the BUG_ON in create_request_message during some performance testing. Analysis of the vmcore showed that the length of the r_dentry->d_name string changed after we allocated the buffer, but before

[PATCH 4.19 034/100] sched/numa: Fix a possible divide-by-zero

2019-04-30 Thread Greg Kroah-Hartman
From: Xie XiuQi commit a860fa7b96e1a1c974556327aa1aee852d434c21 upstream. sched_clock_cpu() may not be consistent between CPUs. If a task migrates to another CPU, then se.exec_start is set to that CPU's rq_clock_task() by update_stats_curr_start(). Specifically, the new value might be before

[PATCH 4.19 041/100] 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 4.19 038/100] 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 4.19 040/100] perf/x86/intel: Update KBL Package C-state events to also include PC8/PC9/PC10 counters

2019-04-30 Thread Greg Kroah-Hartman
From: Harry Pan commit 82c99f7a81f28f8c1be5f701c8377d14c4075b10 upstream. Kaby Lake (and Coffee Lake) has PC8/PC9/PC10 residency counters. This patch updates the list of Kaby/Coffee Lake PMU event counters from the snb_cstates[] list of events to the hswult_cstates[] list of events, which

[PATCH 4.19 014/100] ext4: fix some error pointer dereferences

2019-04-30 Thread Greg Kroah-Hartman
[ Upstream commit 7159a986b4202343f6cca3bb8079ecace5816fd6 ] 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 Signed-off-by: Sasha Levin ---

[PATCH 4.19 044/100] dmaengine: sh: rcar-dmac: Fix glitch in dmaengine_tx_status

2019-04-30 Thread Greg Kroah-Hartman
From: Achim Dahlhoff commit 6e7da74775348d96e2d7efaf3f91410e18c481ef upstream. The tx_status poll in the rcar_dmac driver reads the status register which indicates which chunk is busy (DMACHCRB). Afterwards the point inside the chunk is read from DMATCRB. It is possible that the chunk has

[PATCH 4.19 043/100] 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 4.19 009/100] netfilter: nf_tables: fix set double-free in abort path

2019-04-30 Thread Greg Kroah-Hartman
[ Upstream commit 40ba1d9b4d19796afc9b7ece872f5f3e8f5e2c13 ] The abort path can cause a double-free of an anonymous set. Added-and-to-be-aborted rule looks like this: udp dport { 137, 138 } drop The to-be-aborted transaction list looks like this: newset newsetelem newsetelem rule This gets

[PATCH 4.19 026/100] 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 4.19 019/100] ipvs: fix warning on unused variable

2019-04-30 Thread Greg Kroah-Hartman
[ Upstream commit c93a49b9769e435990c82297aa0baa31e1538790 ] When CONFIG_IP_VS_IPV6 is not defined, build produced this warning: net/netfilter/ipvs/ip_vs_ctl.c:899:6: warning: unused variable ‘ret’ [-Wunused-variable] int ret = 0; ^~~ Fix this by moving the declaration of 'ret' in the

[PATCH 4.19 031/100] trace: Fix preempt_enable_no_resched() abuse

2019-04-30 Thread Greg Kroah-Hartman
From: Peter Zijlstra commit d6097c9e4454adf1f8f2c9547c2fa6060d55d952 upstream. Unless the very next line is schedule(), or implies it, one must not use preempt_enable_no_resched(). It can cause a preemption to go missing and thereby cause arbitrary delays, breaking the PREEMPT=y invariant.

[PATCH 4.19 018/100] vsock/virtio: fix kernel panic from virtio_transport_reset_no_sock

2019-04-30 Thread Greg Kroah-Hartman
[ Upstream commit 4c404ce23358d5d8fbdeb7a6021a9b33d3c3c167 ] Previous to commit 22b5c0b63f32 ("vsock/virtio: fix kernel panic after device hot-unplug"), vsock_core_init() was called from virtio_vsock_probe(). Now, virtio_transport_reset_no_sock() can be called before vsock_core_init() has the

[PATCH 4.19 028/100] zram: pass down the bvec we need to read into in the work struct

2019-04-30 Thread Greg Kroah-Hartman
From: Jérôme Glisse commit e153abc0739ff77bd89c9ba1688cdb963464af97 upstream. When scheduling work item to read page we need to pass down the proper bvec struct which points to the page to read into. Before this patch it uses a randomly initialized bvec (only if PAGE_SIZE != 4096) which is

[PATCH 4.19 025/100] 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 4.19 030/100] MIPS: scall64-o32: Fix indirect syscall number load

2019-04-30 Thread Greg Kroah-Hartman
From: Aurelien Jarno commit 79b4a9cf0e2ea8203ce777c8d5cfa86c71eae86e upstream. Commit 4c21b8fd8f14 (MIPS: seccomp: Handle indirect system calls (o32)) added indirect syscall detection for O32 processes running on MIPS64, but it did not work correctly for big endian kernel/processes. The reason

[PATCH 4.19 008/100] netfilter: nft_compat: use .release_ops and remove list of extension

2019-04-30 Thread Greg Kroah-Hartman
[ Upstream commit b8e204006340b7aaf32bd2b9806c692f6e0cb38a ] Add .release_ops, that is called in case of error at a later stage in the expression initialization path, ie. .select_ops() has been already set up operations and that needs to be undone. This allows us to unwind .select_ops from the

[PATCH 4.19 029/100] lib/Kconfig.debug: fix build error without CONFIG_BLOCK

2019-04-30 Thread Greg Kroah-Hartman
From: YueHaibing commit ae3d6a323347940f0548bbb4b17f0bb2e9164169 upstream. If CONFIG_TEST_KMOD is set to M, while CONFIG_BLOCK is not set, XFS and BTRFS can not be compiled successly. Link: http://lkml.kernel.org/r/20190410075434.35220-1-yuehaib...@huawei.com Fixes: d9c6a72d6fa2 ("kmod: add

[PATCH 4.14 38/53] 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 4.14 39/53] dm integrity: change memcmp to strncmp in dm_integrity_ctr

2019-04-30 Thread Greg Kroah-Hartman
From: Mikulas Patocka commit 0d74e6a3b6421d98eeafbed26f29156d469bc0b5 upstream. If the string opt_string is small, the function memcmp can access bytes that are beyond the terminating nul character. In theory, it could cause segfault, if opt_string were located just below some unmapped memory.

[PATCH 4.19 006/100] netfilter: nf_tables: unbind set in rule from commit path

2019-04-30 Thread Greg Kroah-Hartman
Anonymous sets that are bound to rules from the same transaction trigger a kernel splat from the abort path due to double set list removal and double free. This patch updates the logic to search for the transaction that is responsible for creating the set and disable the set list removal and

[PATCH 4.14 31/53] ipvs: fix warning on unused variable

2019-04-30 Thread Greg Kroah-Hartman
From: Andrea Claudi commit c93a49b9769e435990c82297aa0baa31e1538790 upstream. When CONFIG_IP_VS_IPV6 is not defined, build produced this warning: net/netfilter/ipvs/ip_vs_ctl.c:899:6: warning: unused variable ‘ret’ [-Wunused-variable] int ret = 0; ^~~ Fix this by moving the

[PATCH 4.14 46/53] 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 4.14 34/53] 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 4.14 45/53] 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 4.14 42/53] 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.14 53/53] 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.14 50/53] 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.14 52/53] 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 4.14 03/53] 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 4.14 05/53] zram: pass down the bvec we need to read into in the work struct

2019-04-30 Thread Greg Kroah-Hartman
From: Jérôme Glisse commit e153abc0739ff77bd89c9ba1688cdb963464af97 upstream. When scheduling work item to read page we need to pass down the proper bvec struct which points to the page to read into. Before this patch it uses a randomly initialized bvec (only if PAGE_SIZE != 4096) which is

[PATCH 4.14 00/53] 4.14.115-stable review

2019-04-30 Thread Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.14.115 release. There are 53 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 Thu 02 May 2019 11:34:49 AM UTC. Anything

[PATCH 4.14 08/53] trace: Fix preempt_enable_no_resched() abuse

2019-04-30 Thread Greg Kroah-Hartman
From: Peter Zijlstra commit d6097c9e4454adf1f8f2c9547c2fa6060d55d952 upstream. Unless the very next line is schedule(), or implies it, one must not use preempt_enable_no_resched(). It can cause a preemption to go missing and thereby cause arbitrary delays, breaking the PREEMPT=y invariant.

[PATCH 4.14 26/53] vsock/virtio: fix kernel panic from virtio_transport_reset_no_sock

2019-04-30 Thread Greg Kroah-Hartman
From: Adalbert Lazăr commit 4c404ce23358d5d8fbdeb7a6021a9b33d3c3c167 upstream. Previous to commit 22b5c0b63f32 ("vsock/virtio: fix kernel panic after device hot-unplug"), vsock_core_init() was called from virtio_vsock_probe(). Now, virtio_transport_reset_no_sock() can be called before

[PATCH 4.14 23/53] 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.14 41/53] 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 4.14 09/53] IB/rdmavt: Fix frwr memory registration

2019-04-30 Thread Greg Kroah-Hartman
From: Josh Collier commit 7c39f7f671d2acc0a1f39ebbbee4303ad499bbfa upstream. Current implementation was not properly handling frwr memory registrations. This was uncovered by commit 27f26cec761das ("xprtrdma: Plant XID in on-the-wire RDMA offset (FRWR)") in which xprtrdma, which is used for NFS

[PATCH 4.14 25/53] 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 4.14 29/53] 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 4.14 24/53] 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

<    2   3   4   5   6   7   8   9   10   >