[PATCH 4.14 03/56] ASoC: soc-pcm: BE dai needs prepare when pause release after resume

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 5087a8f17df868601cd7568299e91c28086d2b45 ] If playback/capture is paused and system enters S3, after system returns from suspend, BE dai needs to call prepare() callback when playback/capture is released from pause if RESUME_INFO flag is not set. Currently, the dpcm_be_dai_prepa

[PATCH 4.9 095/102] btrfs: Ensure replaced device doesnt have pending chunk allocation

2019-07-08 Thread Greg Kroah-Hartman
From: Nikolay Borisov commit debd1c065d2037919a7da67baf55cc683fee09f0 upstream. Recent FITRIM work, namely bbbf7243d62d ("btrfs: combine device update operations during transaction commit") combined the way certain operations are recoded in a transaction. As a result an ASSERT was added in dev_r

[PATCH 4.9 090/102] ALSA: line6: Fix write on zero-sized buffer

2019-07-08 Thread Greg Kroah-Hartman
From: Takashi Iwai commit 3450121997ce872eb7f1248417225827ea249710 upstream. LINE6 drivers allocate the buffers based on the value returned from usb_maxpacket() calls. The manipulated device may return zero for this, and this results in the kmalloc() with zero size (and it may succeed) while th

[PATCH 4.9 093/102] drm/imx: notify drm core before sending event during crtc disable

2019-07-08 Thread Greg Kroah-Hartman
From: Robert Beckett commit 78c68e8f5cd24bd32ba4ca1cdfb0c30cf0642685 upstream. Notify drm core before sending pending events during crtc disable. This fixes the first event after disable having an old stale timestamp by having drm_crtc_vblank_off update the timestamp to now. This was seen while

[PATCH 4.14 07/56] drm/mediatek: call mtk_dsi_stop() after mtk_drm_crtc_atomic_disable()

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 2458d9d6d94be982b917e93c61a89b4426f32e31 ] mtk_dsi_stop() should be called after mtk_drm_crtc_atomic_disable(), which needs ovl irq for drm_crtc_wait_one_vblank(), since after mtk_dsi_stop() is called, ovl irq will be disabled. If drm_crtc_wait_one_vblank() is called after last i

[PATCH 4.14 21/56] MIPS: netlogic: xlr: Remove erroneous check in nlm_fmn_send()

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 02eec6c9fc0cb13169cc97a6139771768791f92b ] In nlm_fmn_send() we have a loop which attempts to send a message multiple times in order to handle the transient failure condition of a lack of available credit. When examining the status register to detect the failure we check for a co

[PATCH 4.14 02/56] ASoC : cs4265 : readable register too low

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit f3df05c805983427319eddc2411a2105ee1757cf ] The cs4265_readable_register function stopped short of the maximum register. An example bug is taken from : https://github.com/Audio-Injector/Ultra/issues/25 Where alsactl store fails with : Cannot read control '2,0,0,C Data Buffer,0':

[PATCH 4.9 097/102] arm64, vdso: Define vdso_{start,end} as array

2019-07-08 Thread Greg Kroah-Hartman
Commit dbbb08f500d6146398b794fdc68a8e811366b451 upstream. Adjust vdso_{start|end} to be char arrays to avoid compile-time analysis that flags "too large" memcmp() calls with CONFIG_FORTIFY_SOURCE. Cc: Jisheng Zhang Acked-by: Catalin Marinas Suggested-by: Mark Rutland Signed-off-by: Kees Cook

[PATCH 4.9 099/102] IB/hfi1: Close PSM sdma_progress sleep window

2019-07-08 Thread Greg Kroah-Hartman
From: Mike Marciniszyn commit da9de5f8527f4b9efc82f967d29a583318c034c7 upstream. The call to sdma_progress() is called outside the wait lock. In this case, there is a race condition where sdma_progress() can return false and the sdma_engine can idle. If that happens, there will be no more sdma

[PATCH 4.9 041/102] 9p: acl: fix uninitialized iattr access

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit e02a53d92e197706cad1627bd84705d4aa20a145 ] iattr is passed to v9fs_vfs_setattr_dotl which does send various values from iattr over the wire, even if it tells the server to only look at iattr.ia_valid fields this could leak some stack data. Link: http://lkml.kernel.org/r/1536339

[PATCH 4.9 100/102] MIPS: Add missing EHB in mtc0 -> mfc0 sequence.

2019-07-08 Thread Greg Kroah-Hartman
From: Dmitry Korotin commit 0b24cae4d535045f4c9e177aa228d4e97bad212c upstream. Add a missing EHB (Execution Hazard Barrier) in mtc0 -> mfc0 sequence. Without this execution hazard barrier it's possible for the value read back from the KScratch register to be the value from before the mtc0. Repr

[PATCH 4.9 098/102] KVM: LAPIC: Fix pending interrupt in IRR blocked by software disable LAPIC

2019-07-08 Thread Greg Kroah-Hartman
From: Wanpeng Li commit bb34e690e9340bc155ebed5a3d75fc63ff69e082 upstream. Thomas reported that: | Background: | |In preparation of supporting IPI shorthands I changed the CPU offline |code to software disable the local APIC instead of just masking it. |That's done by clearing

[PATCH 4.9 047/102] mm/page_idle.c: fix oops because end_pfn is larger than max_pfn

2019-07-08 Thread Greg Kroah-Hartman
From: Colin Ian King commit 7298e3b0a149c91323b3205d325e942c3b3b9ef6 upstream. Currently the calcuation of end_pfn can round up the pfn number to more than the actual maximum number of pfns, causing an Oops. Fix this by ensuring end_pfn is never more than max_pfn. This can be easily triggered

[PATCH 4.9 078/102] mfd: omap-usb-tll: Fix register offsets

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 993dc737c0996c163325961fb62a0ed9fd0308b4 ] gcc-8 notices that the register number calculation is wrong when the offset is an 'u8' but the number is larger than 256: drivers/mfd/omap-usb-tll.c: In function 'omap_tll_init': drivers/mfd/omap-usb-tll.c:90:46: error: overflow in conv

[PATCH 4.9 080/102] bug.h: work around GCC PR82365 in BUG()

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 173a3efd3edb2ef6ef07471397c5f542a360e9c1 ] Looking at functions with large stack frames across all architectures led me discovering that BUG() suffers from the same problem as fortify_panic(), which I've added a workaround for already. In short, variables that go out of scope by

[PATCH 4.9 045/102] fs/proc/array.c: allow reporting eip/esp for all coredumping threads

2019-07-08 Thread Greg Kroah-Hartman
From: John Ogness commit cb8f381f1613cafe3aec30809991cd56e7135d92 upstream. 0a1eb2d474ed ("fs/proc: Stop reporting eip and esp in /proc/PID/stat") stopped reporting eip/esp and fd7d56270b52 ("fs/proc: Report eip/esp in /prod/PID/stat for coredumping") reintroduced the feature to fix a regression

[PATCH 4.9 081/102] ARC: handle gcc generated __builtin_trap for older compiler

2019-07-08 Thread Greg Kroah-Hartman
From: Vineet Gupta commit af1be2e21203867cb958aaceed5366e2e24b88e8 upstream. ARC gcc prior to GNU 2018.03 release didn't have a target specific __builtin_trap() implementation, generating default abort() call. Implement the abort() call - emulating what newer gcc does for the same, as suggested

[PATCH 4.9 082/102] clk: sunxi: fix uninitialized access

2019-07-08 Thread Greg Kroah-Hartman
From: Arnd Bergmann commit 4e903450bcb9a6bc90733b981d7cb8b3c4996a0e upstream. gcc-8 reports an uninitialized variable access in a code path that we would see with incorrect DTB input: drivers/clk/sunxi/clk-sun8i-bus-gates.c: In function 'sun8i_h3_bus_gates_init': drivers/clk/sunxi/clk-sun8i-bus

[PATCH 4.9 086/102] ptrace: Fix ->ptracer_cred handling for PTRACE_TRACEME

2019-07-08 Thread Greg Kroah-Hartman
From: Jann Horn commit 6994eefb0053799d2e07cd140df6c2ea106c41ee upstream. Fix two issues: When called for PTRACE_TRACEME, ptrace_link() would obtain an RCU reference to the parent's objective credentials, then give that pointer to get_cred(). However, the object lifetime rules for things like

Re: powerpc/83xx: fix use-after-free on mpc831x_usb_cfg()

2019-07-08 Thread Markus Elfring
> The np variable is still being used after the of_node_put() call, > which may result in use-after-free. > We fix this issue by calling of_node_put() after the last usage. I imagine that this commit description can be improved a bit more (by mentioning the influence of “immr_node”?). How do yo

[PATCH 4.9 079/102] ARC: fix allnoconfig build warning

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 5464d03d92601ac2977ef605b0cbb33276567daf ] Reported-by: Dmitrii Kolesnichenko Signed-off-by: Vineet Gupta Signed-off-by: Sasha Levin --- arch/arc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig index c7a081c583b9

[PATCH 4.9 074/102] scripts/decode_stacktrace.sh: prefix addr2line with $CROSS_COMPILE

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit c04e32e911653442fc834be6e92e072aeebe01a1 ] At least for ARM64 kernels compiled with the crosstoolchain from Debian/stretch or with the toolchain from kernel.org the line number is not decoded correctly by 'decode_stacktrace.sh': $ echo "[ 136.513051] f1+0x0/0xc [kcrash]" | \

[PATCH 4.9 068/102] spi: bitbang: Fix NULL pointer dereference in spi_unregister_master

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 5caaf29af5ca82d5da8bc1d0ad07d9e664ccf1d8 ] If spi_register_master fails in spi_bitbang_start because device_add failure, We should return the error code other than 0, otherwise calling spi_bitbang_stop may trigger NULL pointer dereference like this: BUG: KASAN: null-ptr-deref in

[PATCH 4.9 076/102] MIPS: math-emu: do not use bools for arithmetic

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 8535f2ba0a9b971df62a5890699b9dfe2e0d5580 ] GCC-7 complains about a boolean value being used with an arithmetic AND: arch/mips/math-emu/cp1emu.c: In function 'cop1Emulate': arch/mips/math-emu/cp1emu.c:838:14: warning: '~' on a boolean expression [-Wbool-operation] fpr = (x) &

[PATCH 4.9 077/102] MIPS: netlogic: xlr: Remove erroneous check in nlm_fmn_send()

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 02eec6c9fc0cb13169cc97a6139771768791f92b ] In nlm_fmn_send() we have a loop which attempts to send a message multiple times in order to handle the transient failure condition of a lack of available credit. When examining the status register to detect the failure we check for a co

[PATCH 4.9 075/102] mm/mlock.c: change count_mm_mlocked_page_nr return type

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 0874bb49bb21bf24deda853e8bf61b8325e24bcb ] On a 64-bit machine the value of "vma->vm_end - vma->vm_start" may be negative when using 32 bit ints and the "count >> PAGE_SHIFT"'s result will be wrong. So change the local variable and return value to unsigned long to fix the proble

[PATCH 4.9 067/102] ASoC: soc-pcm: BE dai needs prepare when pause release after resume

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 5087a8f17df868601cd7568299e91c28086d2b45 ] If playback/capture is paused and system enters S3, after system returns from suspend, BE dai needs to call prepare() callback when playback/capture is released from pause if RESUME_INFO flag is not set. Currently, the dpcm_be_dai_prepa

[PATCH 4.9 072/102] usb: gadget: udc: lpc32xx: allocate descriptor with GFP_ATOMIC

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit fbc318afadd6e7ae2252d6158cf7d0c5a2132f7d ] Gadget drivers may queue request in interrupt context. This would lead to a descriptor allocation in that context. In that case we would hit BUG_ON(in_interrupt()) in __get_vm_area_node. Also remove the unnecessary cast. Acked-by: Sylv

[PATCH 4.9 071/102] usb: gadget: fusb300_udc: Fix memory leak of fusb300->ep[i]

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 62fd0e0a24abeebe2c19fce49dd5716d9b62042d ] There is no deallocation of fusb300->ep[i] elements, allocated at fusb300_probe. The patch adds deallocation of fusb300->ep array elements. Signed-off-by: Young Xiao <92siuy...@gmail.com> Signed-off-by: Felipe Balbi Signed-off-by: Sas

[PATCH 4.9 073/102] scsi: hpsa: correct ioaccel2 chaining

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 625d7d3518875c4d303c652a198feaa13d9f52d9 ] - set ioaccel2_sg_element member 'chain_indicator' to IOACCEL2_LAST_SG for the last s/g element. - set ioaccel2_sg_element member 'chain_indicator' to IOACCEL2_CHAIN when chaining. Reviewed-by: Bader Ali - Saleh Reviewed-by: Scott

[PATCH 4.9 044/102] net/9p: include trans_common.h to fix missing prototype warning.

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 52ad259eaac0454c1ac7123e7148cf8d6e6f5301 ] This silences -Wmissing-prototypes when defining p9_release_pages. Link: http://lkml.kernel.org/r/b1c4df8f21689b10d451c28fe38e860722d20e71.1542089696.git.d...@net.com.org.es Signed-off-by: Adeodato Simó Signed-off-by: Dominique Martin

[PATCH 4.9 070/102] ASoC: max98090: remove 24-bit format support if RJ is 0

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 5628c8979642a076f91ee86c3bae5ad251639af0 ] The supported formats are S16_LE and S24_LE now. However, by datasheet of max98090, S24_LE is only supported when it is in the right justified mode. We should remove 24-bit format if it is not in that mode to avoid triggering error. Sig

[PATCH 4.9 043/102] 9p: p9dirent_read: check network-provided name length

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit ef5305f1f72eb1cfcda25c382bb0368509c0385b ] strcpy to dirent->d_name could overflow the buffer, use strscpy to check the provided string length and error out if the size was too big. While we are here, make the function return an error when the pdu parsing failed, instead of retu

[PATCH 4.9 063/102] bpf: udp: ipv6: Avoid running reuseports bpf_prog from __udp6_lib_err

2019-07-08 Thread Greg Kroah-Hartman
From: Martin KaFai Lau commit 4ac30c4b3659efac031818c418beb51e630d512d upstream. __udp6_lib_err() may be called when handling icmpv6 message. For example, the icmpv6 toobig(type=2). __udp6_lib_lookup() is then called which may call reuseport_select_sock(). reuseport_select_sock() will call int

[PATCH 4.9 064/102] tipc: pass tunnel dev as NULL to udp_tunnel(6)_xmit_skb

2019-07-08 Thread Greg Kroah-Hartman
From: Xin Long commit c3bcde026684c62d7a2b6f626dc7cf763833875c upstream. udp_tunnel(6)_xmit_skb() called by tipc_udp_xmit() expects a tunnel device to count packets on dev->tstats, a perpcu variable. However, TIPC is using udp tunnel with no tunnel device, and pass the lower dev, like veth devic

[PATCH 4.9 061/102] net: check before dereferencing netdev_ops during busy poll

2019-07-08 Thread Greg Kroah-Hartman
From: Josh Elsasser init_dummy_netdev() leaves its netdev_ops pointer zeroed. This leads to a NULL pointer dereference when sk_busy_loop fires against an iwlwifi wireless adapter and checks napi->dev->netdev_ops->ndo_busy_poll. Avoid this by ensuring napi->dev->netdev_ops is valid before followi

[PATCH 4.9 042/102] 9p/rdma: remove useless check in cm_event_handler

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 473c7dd1d7b59ff8f88a5154737e3eac78a96e5b ] the client c is always dereferenced to get the rdma struct, so c has to be a valid pointer at this point. Gcc would optimize that away but let's make coverity happy... Link: http://lkml.kernel.org/r/1536339057-21974-3-git-send-email-as

[PATCH 4.9 059/102] bonding: Always enable vlan tx offload

2019-07-08 Thread Greg Kroah-Hartman
From: YueHaibing [ Upstream commit 30d8177e8ac776d89d387fad547af6a0f599210e ] We build vlan on top of bonding interface, which vlan offload is off, bond mode is 802.3ad (LACP) and xmit_hash_policy is BOND_XMIT_POLICY_ENCAP34. Because vlan tx offload is off, vlan tci is cleared and skb push the

[PATCH 4.9 034/102] mac80211: drop robust management frames from unknown TA

2019-07-08 Thread Greg Kroah-Hartman
From: Johannes Berg commit 588f7d39b3592a36fb7702ae3b8bdd9be4621e2f upstream. When receiving a robust management frame, drop it if we don't have rx->sta since then we don't have a security association and thus couldn't possibly validate the frame. Cc: sta...@vger.kernel.org Signed-off-by: Johan

[PATCH 4.9 058/102] team: Always enable vlan tx offload

2019-07-08 Thread Greg Kroah-Hartman
From: YueHaibing [ Upstream commit ee4297420d56a0033a8593e80b33fcc93fda8509 ] We should rather have vlan_tci filled all the way down to the transmitting netdevice and let it do the hw/sw vlan implementation. Suggested-by: Jiri Pirko Signed-off-by: YueHaibing Signed-off-by: David S. Miller Si

[PATCH 4.9 052/102] af_packet: Block execution of tasks waiting for transmit to complete in AF_PACKET

2019-07-08 Thread Greg Kroah-Hartman
From: Neil Horman [ Upstream commit 89ed5b519004a7706f50b70f611edbd3aaacff2c ] When an application is run that: a) Sets its scheduler to be SCHED_FIFO and b) Opens a memory mapped AF_PACKET socket, and sends frames with the MSG_DONTWAIT flag cleared, its possible for the application to hang fore

[PATCH 4.9 060/102] ipv4: Use return value of inet_iif() for __raw_v4_lookup in the while loop

2019-07-08 Thread Greg Kroah-Hartman
From: Stephen Suryaputra [ Upstream commit 38c73529de13e1e10914de7030b659a2f8b01c3b ] In commit 19e4e768064a8 ("ipv4: Fix raw socket lookup for local traffic"), the dif argument to __raw_v4_lookup() is coming from the returned value of inet_iif() but the change was done only for the first lookup

[PATCH 4.9 033/102] cfg80211: fix memory leak of wiphy device name

2019-07-08 Thread Greg Kroah-Hartman
From: Eric Biggers commit 4f488fbca2a86cc7714a128952eead92cac279ab upstream. In wiphy_new_nm(), if an error occurs after dev_set_name() and device_initialize() have already been called, it's necessary to call put_device() (via wiphy_free()) to avoid a memory leak. Reported-by: syzbot+7fddca2257

[PATCH 4.9 051/102] cpu/speculation: Warn on unsupported mitigations= parameter

2019-07-08 Thread Greg Kroah-Hartman
From: Geert Uytterhoeven commit 1bf72720281770162c87990697eae1ba2f1d917a upstream. Currently, if the user specifies an unsupported mitigation strategy on the kernel command line, it will be ignored silently. The code will fall back to the default strategy, possibly leaving the system more vulne

[PATCH 4.9 056/102] tipc: check msg->req data len in tipc_nl_compat_bearer_disable

2019-07-08 Thread Greg Kroah-Hartman
From: Xin Long [ Upstream commit 4f07b80c973348a99b5d2a32476a2e7877e94a05 ] This patch is to fix an uninit-value issue, reported by syzbot: BUG: KMSAN: uninit-value in memchr+0xce/0x110 lib/string.c:981 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x191/0x1f0 lib

[PATCH 4.9 000/102] 4.9.185-stable review

2019-07-08 Thread Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.9.185 release. There are 102 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 10 Jul 2019 03:03:52 PM UTC. Anything re

[PATCH 4.9 008/102] ARC: fix build warnings with !CONFIG_KPROBES

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 4c6fabda1ad1dec6d274c098ef0a91809c74f2e3 ] | CC lib/nmi_backtrace.o | In file included from ../include/linux/kprobes.h:43:0, | from ../lib/nmi_backtrace.c:17: | ../arch/arc/include/asm/kprobes.h:57:13: warning: 'trap_is_kprobe' defined but not used [-Wunu

[PATCH 4.9 040/102] 9p/rdma: do not disconnect on down_interruptible EAGAIN

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 8b894adb2b7e1d1e64b8954569c761eaf3d51ab5 ] 9p/rdma would sometimes drop the connection and display errors in recv_done when the user does ^C. The errors were caused by recv buffers that were posted at the time of disconnect, and we just do not want to disconnect when down_interru

[PATCH 4.9 006/102] Input: uinput - add compat ioctl number translation for UI_*_FF_UPLOAD

2019-07-08 Thread Greg Kroah-Hartman
From: Andrey Smirnov commit 7c7da40da1640ce6814dab1e8031b44e19e5a3f6 upstream. In the case of compat syscall ioctl numbers for UI_BEGIN_FF_UPLOAD and UI_END_FF_UPLOAD need to be adjusted before being passed on uinput_ioctl_handler() since code built with -m32 will be passing slightly different v

[PATCH 4.9 039/102] perf header: Fix unchecked usage of strncpy()

2019-07-08 Thread Greg Kroah-Hartman
From: Arnaldo Carvalho de Melo commit 5192bde7d98c99f2cd80225649e3c2e7493722f7 upstream. The strncpy() function may leave the destination string buffer unterminated, better use strlcpy() that we have a __weak fallback implementation for systems without it. This fixes this warning on an Alpine L

[PATCH 4.9 036/102] IB/hfi1: Avoid hardlockup with flushlist_lock

2019-07-08 Thread Greg Kroah-Hartman
commit cf131a81967583ae737df6383a0893b9fee75b4e upstream. Heavy contention of the sde flushlist_lock can cause hard lockups at extreme scale when the flushing logic is under stress. Mitigate by replacing the item at a time copy to the local list with an O(1) list_splice_init() and using the high

[PATCH 4.9 038/102] perf help: Remove needless use of strncpy()

2019-07-08 Thread Greg Kroah-Hartman
From: Arnaldo Carvalho de Melo commit b6313899f4ed2e76b8375cf8069556f5b94fbff0 upstream. Since we make sure the destination buffer has at least strlen(orig) + 1, no need to do a strncpy(dest, orig, strlen(orig)), just use strcpy(dest, orig). This silences this gcc 8.2 warning on Alpine Linux:

[PATCH 4.9 027/102] can: flexcan: fix timeout when set small bitrate

2019-07-08 Thread Greg Kroah-Hartman
From: Joakim Zhang commit 247e5356a709eb49a0d95ff2a7f07dac05c8252c upstream. Current we can meet timeout issue when setting a small bitrate like 1 as follows on i.MX6UL EVK board (ipg clock = 66MHZ, per clock = 30MHZ): | root@imx6ul7d:~# ip link set can0 up type can bitrate 1 A link ch

[PATCH 4.9 037/102] perf ui helpline: Use strlcpy() as a shorter form of strncpy() + explicit set nul

2019-07-08 Thread Greg Kroah-Hartman
From: Arnaldo Carvalho de Melo commit 4d0f16d059ddb91424480d88473f7392f24aebdc upstream. The strncpy() function may leave the destination string buffer unterminated, better use strlcpy() that we have a __weak fallback implementation for systems without it. In this case we are actually setting t

[PATCH 4.9 026/102] btrfs: start readahead also in seed devices

2019-07-08 Thread Greg Kroah-Hartman
From: Naohiro Aota commit c4e0540d0ad49c8ceab06cceed1de27c4fe29f6e upstream. Currently, btrfs does not consult seed devices to start readahead. As a result, if readahead zone is added to the seed devices, btrfs_reada_wait() indefinitely wait for the reada_ctl to finish. You can reproduce the hu

[PATCH 4.9 003/102] scsi: ufs: Avoid runtime suspend possibly being blocked forever

2019-07-08 Thread Greg Kroah-Hartman
From: Stanley Chu commit 24e2e7a19f7e4b83d0d5189040d997bce3596473 upstream. UFS runtime suspend can be triggered after pm_runtime_enable() is invoked in ufshcd_pltfrm_init(). However if the first runtime suspend is triggered before binding ufs_hba structure to ufs device structure via platform_s

[PATCH 4.9 029/102] powerpc/bpf: use unsigned division instruction for 64-bit operations

2019-07-08 Thread Greg Kroah-Hartman
From: Naveen N. Rao commit 758f2046ea040773ae8ea7f72dd3bbd8fa984501 upstream. BPF_ALU64 div/mod operations are currently using signed division, unlike BPF_ALU32 operations. Fix the same. DIV64 and MOD64 overflow tests pass with this fix. Fixes: 156d0e290e969c ("powerpc/ebpf/jit: Implement JIT c

[PATCH 4.9 028/102] can: purge socket error queue on sock destruct

2019-07-08 Thread Greg Kroah-Hartman
From: Willem de Bruijn commit fd704bd5ee749d560e86c4f1fd2ef486d8abf7cf upstream. CAN supports software tx timestamps as of the below commit. Purge any queued timestamp packets on socket destroy. Fixes: 51f31cabe3ce ("ip: support for TX timestamps on UDP and RAW sockets") Reported-by: syzbot+a90

[PATCH 4.9 030/102] ARM: imx: cpuidle-imx6sx: Restrict the SW2ISO increase to i.MX6SX

2019-07-08 Thread Greg Kroah-Hartman
From: Fabio Estevam commit b25af2ff7c07bd19af74e3f64ff82e2880d13d81 upstream. Since commit 1e434b703248 ("ARM: imx: update the cpu power up timing setting on i.mx6sx") some characters loss is noticed on i.MX6ULL UART as reported by Christoph Niedermaier. The intention of such commit was to incr

[PATCH 4.9 031/102] Bluetooth: Align minimum encryption key size for LE and BR/EDR connections

2019-07-08 Thread Greg Kroah-Hartman
From: Marcel Holtmann commit d5bb334a8e171b262e48f378bd2096c0ea458265 upstream. The minimum encryption key size for LE connections is 56 bits and to align LE with BR/EDR, enforce 56 bits of minimum encryption key size for BR/EDR connections as well. Signed-off-by: Marcel Holtmann Signed-off-by

[PATCH 4.9 025/102] nvme: Fix u32 overflow in the number of namespace list calculation

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit c8e8c77b3bdbade6e26e8e76595f141ede12b692 ] The Number of Namespaces (nn) field in the identify controller data structure is defined as u32 and the maximum allowed value in NVMe specification is 0xFFFEUL. This change fixes the possible overflow of the DIV_ROUND_UP() operation

[PATCH 4.9 024/102] hwmon: (pmbus/core) Treat parameters as paged if on multiple pages

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 4a60570dce658e3f8885bbcf852430b99f65aca5 ] Some chips have attributes which exist on more than one page but the attribute is not presently marked as paged. This causes the attributes to be generated with the same label, which makes it impossible for userspace to tell them apart.

[PATCH 4.9 015/102] net: dsa: mv88e6xxx: avoid error message on remove from VLAN 0

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 62394708f3e01c9f2be6be74eb6305bae1ed924f ] When non-bridged, non-vlan'ed mv88e6xxx port is moving down, error message is logged: failed to kill vid 0081/0 for device eth_cu_1000_4 This is caused by call from __vlan_vid_del() with vin set to zero, over call chain this results in

[PATCH 4.4 34/73] 9p: p9dirent_read: check network-provided name length

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit ef5305f1f72eb1cfcda25c382bb0368509c0385b ] strcpy to dirent->d_name could overflow the buffer, use strscpy to check the provided string length and error out if the size was too big. While we are here, make the function return an error when the pdu parsing failed, instead of retu

[PATCH 4.4 73/73] dmaengine: imx-sdma: remove BD_INTR for channel0

2019-07-08 Thread Greg Kroah-Hartman
From: Robin Gong commit 3f93a4f297961c12bb17aa16cb3a4d1291823cae upstream. It is possible for an irq triggered by channel0 to be received later after clks are disabled once firmware loaded during sdma probe. If that happens then clearing them by writing to SDMA_H_INTR won't work and the kernel w

[PATCH 4.4 35/73] net/9p: include trans_common.h to fix missing prototype warning.

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 52ad259eaac0454c1ac7123e7148cf8d6e6f5301 ] This silences -Wmissing-prototypes when defining p9_release_pages. Link: http://lkml.kernel.org/r/b1c4df8f21689b10d451c28fe38e860722d20e71.1542089696.git.d...@net.com.org.es Signed-off-by: Adeodato Simó Signed-off-by: Dominique Martin

[PATCH 4.9 013/102] IB/{qib, hfi1, rdmavt}: Correct ibv_devinfo max_mr value

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 35164f5259a47ea756fa1deb3e463ac2a4f10dc9 ] The command 'ibv_devinfo -v' reports 0 for max_mr. Fix by assigning the query values after the mr lkey_table has been built rather than early on in the driver. Fixes: 7b1e2099adc8 ("IB/rdmavt: Move memory registration into rdmavt") Rev

[PATCH 4.9 010/102] parisc: Fix compiler warnings in float emulation code

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 6b98d9134e14f5ef4bcf64b27eedf484ed19a1ec ] Avoid such compiler warnings: arch/parisc/math-emu/cnv_float.h:71:27: warning: ‘<<’ in boolean context, did you mean ‘<’ ? [-Wint-in-bool-context] ((Dintp1(dint_valueA) << 33 - SGL_EXP_LENGTH) || Dintp2(dint_valueB)) arch/parisc/ma

[PATCH 4.9 014/102] MIPS: uprobes: remove set but not used variable epc

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit f532beeeff0c0a3586cc15538bc52d249eb19e7c ] Fixes gcc '-Wunused-but-set-variable' warning: arch/mips/kernel/uprobes.c: In function 'arch_uprobe_pre_xol': arch/mips/kernel/uprobes.c:115:17: warning: variable 'epc' set but not used [-Wunused-but-set-variable] It's never used sinc

[PATCH 4.9 011/102] IB/rdmavt: Fix alloc_qpn() WARN_ON()

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 2abae62a26a265129b364d8c1ef3be55e2c01309 ] The qpn allocation logic has a WARN_ON() that intends to detect the use of an index that will introduce bits in the lower order bits of the QOS bits in the QPN. Unfortunately, it has the following bugs: - it misfires when wrapping QPN a

[PATCH 4.9 016/102] net: hns: Fix loopback test failed at copper ports

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 2e1f164861e500f4e068a9d909bbd3fcc7841483 ] When doing a loopback test at copper ports, the serdes loopback and the phy loopback will fail, because of the adjust link had not finished, and phy not ready. Adds sleep between adjust link and test process to fix it. Signed-off-by: Y

[PATCH 4.9 012/102] IB/hfi1: Insure freeze_work work_struct is canceled on shutdown

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 6d517353c70bb0818b691ca003afdcb5ee5ea44e ] By code inspection, the freeze_work is never canceled. Fix by adding a cancel_work_sync in the shutdown path to insure it is no longer running. Fixes: 7724105686e7 ("IB/hfi1: add driver files") Reviewed-by: Michael J. Ruhl Reviewed-by

[PATCH 4.9 023/102] s390/qeth: fix VLAN attribute in bridge_hostnotify udev event

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 335726195e460cb6b3f795b695bfd31f0ea70ef0 ] Enabling sysfs attribute bridge_hostnotify triggers a series of udev events for the MAC addresses of all currently connected peers. In case no VLAN is set for a peer, the device reports the corresponding MAC addresses with VLAN ID 4096.

[PATCH 4.9 022/102] scsi: ufs: Check that space was properly alloced in copy_query_response

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 1c90836f70f9a8ef7b7ad9e1fdd8961903e6ced6 ] struct ufs_dev_cmd is the main container that supports device management commands. In the case of a read descriptor request, we assume that the proper space was allocated in dev_cmd to hold the returning descriptor. This is no longer tr

[PATCH 4.9 018/102] net: ethernet: mediatek: Use hw_feature to judge if HWLRO is supported

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 9e4f56f1a7f3287718d0083b5cb85298dc05a5fd ] Should hw_feature as hardware capability flags to check if hardware LRO got support. Signed-off-by: Mark Lee Signed-off-by: Sean Wang Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/mediatek/mtk_e

[PATCH v2] kernfs: fix potential null pointer dereference

2019-07-08 Thread Peng Wang
Get root safely after kn is ensureed to be not null. Signed-off-by: Peng Wang --- fs/kernfs/dir.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/kernfs/dir.c b/fs/kernfs/dir.c index a387534c9577..ddf537923a0a 100644 --- a/fs/kernfs/dir.c +++ b/fs/kernfs/dir.c @@ -430,7

[PATCH 4.9 019/102] net: ethernet: mediatek: Use NET_IP_ALIGN to judge if HW RX_2BYTE_OFFSET is enabled

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 880c2d4b2fdfd580ebcd6bb7240a8027a1d34751 ] Should only enable HW RX_2BYTE_OFFSET function in the case NET_IP_ALIGN equals to 2. Signed-off-by: Mark Lee Signed-off-by: Sean Wang Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/mediatek/mtk_e

[PATCH 4.4 61/73] MIPS: Workaround GCC __builtin_unreachable reordering bug

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 906d441febc0de974b2a6ef848a8f058f3bfada3 ] Some versions of GCC for the MIPS architecture suffer from a bug which can lead to instructions from beyond an unreachable statement being incorrectly reordered into earlier branch delay slots if the unreachable statement is the only con

[PATCH 4.4 32/73] 9p: acl: fix uninitialized iattr access

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit e02a53d92e197706cad1627bd84705d4aa20a145 ] iattr is passed to v9fs_vfs_setattr_dotl which does send various values from iattr over the wire, even if it tells the server to only look at iattr.ia_valid fields this could leak some stack data. Link: http://lkml.kernel.org/r/1536339

[PATCH 4.4 69/73] tty: rocket: fix incorrect forward declaration of rp_init()

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 423ea3255424b954947d167681b71ded1b8fca53 ] Make the forward declaration actually match the real function definition, something that previous versions of gcc had just ignored. This is another patch to fix new warnings from gcc-9 before I start the merge window pulls. I don't wan

[PATCH 4.4 31/73] 9p/rdma: do not disconnect on down_interruptible EAGAIN

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 8b894adb2b7e1d1e64b8954569c761eaf3d51ab5 ] 9p/rdma would sometimes drop the connection and display errors in recv_done when the user does ^C. The errors were caused by recv buffers that were posted at the time of disconnect, and we just do not want to disconnect when down_interru

[PATCH 4.4 72/73] KVM: x86: degrade WARN to pr_warn_ratelimited

2019-07-08 Thread Greg Kroah-Hartman
From: Paolo Bonzini commit 3f16a5c318392cbb5a0c7a3d19dff8c8ef3c38ee upstream. This warning can be triggered easily by userspace, so it should certainly not cause a panic if panic_on_warn is set. Reported-by: syzbot+c03f30b4f4c46bdf8...@syzkaller.appspotmail.com Suggested-by: Alexander Potapenko

[PATCH 4.4 68/73] btrfs: Ensure replaced device doesnt have pending chunk allocation

2019-07-08 Thread Greg Kroah-Hartman
From: Nikolay Borisov commit debd1c065d2037919a7da67baf55cc683fee09f0 upstream. Recent FITRIM work, namely bbbf7243d62d ("btrfs: combine device update operations during transaction commit") combined the way certain operations are recoded in a transaction. As a result an ASSERT was added in dev_r

[PATCH 4.4 66/73] ALSA: usb-audio: fix sign unintended sign extension on left shifts

2019-07-08 Thread Greg Kroah-Hartman
From: Colin Ian King commit 2acf5a3e6e9371e63c9e4ff54d84d08f630467a0 upstream. There are a couple of left shifts of unsigned 8 bit values that first get promoted to signed ints and hence get sign extended on the shift if the top bit of the 8 bit values are set. Fix this by casting the 8 bit valu

[PATCH 4.4 30/73] perf help: Remove needless use of strncpy()

2019-07-08 Thread Greg Kroah-Hartman
From: Arnaldo Carvalho de Melo commit b6313899f4ed2e76b8375cf8069556f5b94fbff0 upstream. Since we make sure the destination buffer has at least strlen(orig) + 1, no need to do a strncpy(dest, orig, strlen(orig)), just use strcpy(dest, orig). This silences this gcc 8.2 warning on Alpine Linux:

[PATCH 4.4 67/73] lib/mpi: Fix karactx leak in mpi_powm

2019-07-08 Thread Greg Kroah-Hartman
From: Herbert Xu commit c8ea9fce2baf7b643384f36f29e4194fa40d33a6 upstream. Sometimes mpi_powm will leak karactx because a memory allocation failure causes a bail-out that skips the freeing of karactx. This patch moves the freeing of karactx to the end of the function like everything else so tha

[PATCH 4.4 70/73] ARC: handle gcc generated __builtin_trap for older compiler

2019-07-08 Thread Greg Kroah-Hartman
From: Vineet Gupta commit af1be2e21203867cb958aaceed5366e2e24b88e8 upstream. ARC gcc prior to GNU 2018.03 release didn't have a target specific __builtin_trap() implementation, generating default abort() call. Implement the abort() call - emulating what newer gcc does for the same, as suggested

[PATCH 4.4 65/73] ALSA: firewire-lib/fireworks: fix miss detection of received MIDI messages

2019-07-08 Thread Greg Kroah-Hartman
From: Takashi Sakamoto commit 7fbd1753b64eafe21cf842348a40a691d0dee440 upstream. In IEC 61883-6, 8 MIDI data streams are multiplexed into single MIDI conformant data channel. The index of stream is calculated by modulo 8 of the value of data block counter. In fireworks, the value of data block

[PATCH 4.4 63/73] crypto: user - prevent operating on larval algorithms

2019-07-08 Thread Greg Kroah-Hartman
From: Eric Biggers commit 21d4120ec6f5b5992b01b96ac484701163917b63 upstream. Michal Suchanek reported [1] that running the pcrypt_aead01 test from LTP [2] in a loop and holding Ctrl-C causes a NULL dereference of alg->cra_users.next in crypto_remove_spawns(), via crypto_del_alg(). The test repea

[PATCH 4.4 60/73] bug.h: work around GCC PR82365 in BUG()

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 173a3efd3edb2ef6ef07471397c5f542a360e9c1 ] Looking at functions with large stack frames across all architectures led me discovering that BUG() suffers from the same problem as fortify_panic(), which I've added a workaround for already. In short, variables that go out of scope by

[PATCH 4.4 57/73] MIPS: math-emu: do not use bools for arithmetic

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 8535f2ba0a9b971df62a5890699b9dfe2e0d5580 ] GCC-7 complains about a boolean value being used with an arithmetic AND: arch/mips/math-emu/cp1emu.c: In function 'cop1Emulate': arch/mips/math-emu/cp1emu.c:838:14: warning: '~' on a boolean expression [-Wbool-operation] fpr = (x) &

[PATCH 4.4 56/73] ARC: fix build warning in elf.h

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 1dec78585328db00e33fb18dc1a6deed0e2095a5 ] The cast valid since TASK_SIZE * 2 will never actually cause overflow. | CC fs/binfmt_elf.o | In file included from ../include/linux/elf.h:4:0, | from ../include/linux/module.h:15, | from ../fs/b

[PATCH 4.4 55/73] ARC: Assume multiplier is always present

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 0eca6fdb3193410fbe66b6f064431cc394513e82 ] It is unlikely that designs running Linux will not have multiplier. Further the current support is not complete as tool don't generate a multilib w/o multiplier. Signed-off-by: Vineet Gupta Signed-off-by: Sasha Levin --- arch/arc/Kco

[PATCH 4.4 29/73] perf ui helpline: Use strlcpy() as a shorter form of strncpy() + explicit set nul

2019-07-08 Thread Greg Kroah-Hartman
From: Arnaldo Carvalho de Melo commit 4d0f16d059ddb91424480d88473f7392f24aebdc upstream. The strncpy() function may leave the destination string buffer unterminated, better use strlcpy() that we have a __weak fallback implementation for systems without it. In this case we are actually setting t

[PATCH 4.4 53/73] usb: gadget: udc: lpc32xx: allocate descriptor with GFP_ATOMIC

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit fbc318afadd6e7ae2252d6158cf7d0c5a2132f7d ] Gadget drivers may queue request in interrupt context. This would lead to a descriptor allocation in that context. In that case we would hit BUG_ON(in_interrupt()) in __get_vm_area_node. Also remove the unnecessary cast. Acked-by: Sylv

[PATCH 4.4 54/73] scsi: hpsa: correct ioaccel2 chaining

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 625d7d3518875c4d303c652a198feaa13d9f52d9 ] - set ioaccel2_sg_element member 'chain_indicator' to IOACCEL2_LAST_SG for the last s/g element. - set ioaccel2_sg_element member 'chain_indicator' to IOACCEL2_CHAIN when chaining. Reviewed-by: Bader Ali - Saleh Reviewed-by: Scott

[PATCH 4.4 48/73] um: Compile with modern headers

2019-07-08 Thread Greg Kroah-Hartman
From: Jason A. Donenfeld commit 530ba6c7cb3c22435a4d26de47037bb6f86a5329 upstream. Recent libcs have gotten a bit more strict, so we actually need to include the right headers and use the right types. This enables UML to compile again. Signed-off-by: Jason A. Donenfeld Cc: sta...@vger.kernel.o

[PATCH 4.4 46/73] net: check before dereferencing netdev_ops during busy poll

2019-07-08 Thread Greg Kroah-Hartman
From: Josh Elsasser init_dummy_netdev() leaves its netdev_ops pointer zeroed. This leads to a NULL pointer dereference when sk_busy_loop fires against an iwlwifi wireless adapter and checks napi->dev->netdev_ops->ndo_busy_poll. Avoid this by ensuring napi->dev->netdev_ops is valid before followi

[PATCH 4.4 51/73] ASoC: max98090: remove 24-bit format support if RJ is 0

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 5628c8979642a076f91ee86c3bae5ad251639af0 ] The supported formats are S16_LE and S24_LE now. However, by datasheet of max98090, S24_LE is only supported when it is in the right justified mode. We should remove 24-bit format if it is not in that mode to avoid triggering error. Sig

[PATCH 4.4 52/73] usb: gadget: fusb300_udc: Fix memory leak of fusb300->ep[i]

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 62fd0e0a24abeebe2c19fce49dd5716d9b62042d ] There is no deallocation of fusb300->ep[i] elements, allocated at fusb300_probe. The patch adds deallocation of fusb300->ep array elements. Signed-off-by: Young Xiao <92siuy...@gmail.com> Signed-off-by: Felipe Balbi Signed-off-by: Sas

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