[PATCH 4.19 41/51] drm: add non-desktop quirks to Sensics and OSVR headsets.

2019-06-09 Thread Greg Kroah-Hartman
From: Ryan Pavlik commit 29054230f3e11ea818eccfa7bb4e4b3e89544164 upstream. Add two EDID vendor/product pairs used across a variety of Sensics products, as well as the OSVR HDK and HDK 2. Signed-off-by: Ryan Pavlik Signed-off-by: Daniel Stone Reviewed-by: Daniel Stone Reviewed-by: Philipp

[PATCH 4.19 42/51] drm/amdgpu/psp: move psp version specific function pointers to early_init

2019-06-09 Thread Greg Kroah-Hartman
From: Alex Deucher commit 9d6fea5744d6798353f37ac42a8a653a2607ca69 upstream. In case we need to use them for GPU reset prior initializing the asic. Fixes a crash if the driver attempts to reset the GPU at driver load time. Acked-by: Christian König Signed-off-by: Alex Deucher Cc:

[PATCH 4.19 45/51] drm/i915: Fix I915_EXEC_RING_MASK

2019-06-09 Thread Greg Kroah-Hartman
From: Chris Wilson commit d90c06d57027203f73021bb7ddb30b800d65c636 upstream. This was supposed to be a mask of all known rings, but it is being used by execbuffer to filter out invalid rings, and so is instead mapping high unused values onto valid rings. Instead of a mask of all known rings, we

[PATCH 4.14 06/35] pktgen: do not sleep with the thread lock held.

2019-06-09 Thread Greg Kroah-Hartman
From: Paolo Abeni [ Upstream commit 720f1de4021f09898b8c8443f3b3e995991b6e3a ] Currently, the process issuing a "start" command on the pktgen procfs interface, acquires the pktgen thread lock and never release it, until all pktgen threads are completed. The above can blocks indefinitely any

[PATCH 4.14 07/35] ipv6: fix EFAULT on sendto with icmpv6 and hdrincl

2019-06-09 Thread Greg Kroah-Hartman
From: Olivier Matz [ Upstream commit b9aa52c4cb457e7416cc0c95f475e72ef4a61336 ] The following code returns EFAULT (Bad address): s = socket(AF_INET6, SOCK_RAW, IPPROTO_ICMPV6); setsockopt(s, SOL_IPV6, IPV6_HDRINCL, 1); sendto(ipv6_icmp6_packet, addr); /* returns -1, errno = EFAULT */

[PATCH 4.14 28/35] drm/amdgpu/psp: move psp version specific function pointers to early_init

2019-06-09 Thread Greg Kroah-Hartman
From: Alex Deucher commit 9d6fea5744d6798353f37ac42a8a653a2607ca69 upstream. In case we need to use them for GPU reset prior initializing the asic. Fixes a crash if the driver attempts to reset the GPU at driver load time. Acked-by: Christian König Signed-off-by: Alex Deucher Cc:

[PATCH 4.14 23/35] Revert "MIPS: perf: ath79: Fix perfcount IRQ assignment"

2019-06-09 Thread Greg Kroah-Hartman
From: Greg Kroah-Hartman This reverts commit 9547d81ac3bc0d2b9729a28e7dd610007144a837 which is commit a1e8783db8e0d58891681bc1e6d9ada66eae8e20 upstream. Petr writes: Karl has reported to me today, that he's experiencing weird reboot hang on his devices with 4.9.180 kernel and

[PATCH 4.14 15/35] fuse: fallocate: fix return with locked inode

2019-06-09 Thread Greg Kroah-Hartman
From: Miklos Szeredi commit 35d6fcbb7c3e296a52136347346a698a35af3fda upstream. Do the proper cleanup in case the size check fails. Tested with xfstests:generic/228 Reported-by: kbuild test robot Reported-by: Dan Carpenter Fixes: 0cbade024ba5 ("fuse: honor RLIMIT_FSIZE in

[PATCH 4.14 29/35] drm/radeon: prefer lower reference dividers

2019-06-09 Thread Greg Kroah-Hartman
From: Christian König commit 2e26ccb119bde03584be53406bbd22e711b0d6e6 upstream. Instead of the closest reference divider prefer the lowest, this fixes flickering issues on HP Compaq nx9420. Bugs: https://bugs.freedesktop.org/show_bug.cgi?id=108514 Suggested-by: Paul Dufresne Signed-off-by:

[PATCH 4.14 35/35] fuse: Add FOPEN_STREAM to use stream_open()

2019-06-09 Thread Greg Kroah-Hartman
From: Kirill Smelkov commit bbd84f33652f852ce5992d65db4d020aba21f882 upstream. Starting from commit 9c225f2655e3 ("vfs: atomic f_pos accesses as per POSIX") files opened even via nonseekable_open gate read and write via lock and do not allow them to be run simultaneously. This can create read

[PATCH 4.14 32/35] TTY: serial_core, add ->install

2019-06-09 Thread Greg Kroah-Hartman
From: Jiri Slaby commit 4cdd17ba1dff20ffc99fdbd2e6f0201fc7fe67df upstream. We need to compute the uart state only on the first open. This is usually what is done in the ->install hook. serial_core used to do this in ->open on every open. So move it to ->install. As a side effect, it ensures

[PATCH 4.14 16/35] pstore: Remove needless lock during console writes

2019-06-09 Thread Greg Kroah-Hartman
From: Kees Cook commit b77fa617a2ff4d6beccad3d3d4b3a1f2d10368aa upstream. Since the console writer does not use the preallocated crash dump buffer any more, there is no reason to perform locking around it. Fixes: 70ad35db3321 ("pstore: Convert console write to use ->write_buf") Signed-off-by:

[PATCH 4.14 27/35] drm/nouveau: add kconfig option to turn off nouveau legacy contexts. (v3)

2019-06-09 Thread Greg Kroah-Hartman
From: Dave Airlie commit b30a43ac7132cdda833ac4b13dd1ebd35ace14b7 upstream. There was a nouveau DDX that relied on legacy context ioctls to work, but we fixed it years ago, give distros that have a modern DDX the option to break the uAPI and close the mess of holes that legacy context support

[PATCH 4.9 15/83] xen/pciback: Dont disable PCI_COMMAND on PCI device reset.

2019-06-09 Thread Greg Kroah-Hartman
From: Konrad Rzeszutek Wilk commit 7681f31ec9cdacab4fd10570be924f2cef6669ba upstream. There is no need for this at all. Worst it means that if the guest tries to write to BARs it could lead (on certain platforms) to PCI SERR errors. Please note that with

[PATCH 4.9 01/83] ipv6: Consider sk_bound_dev_if when binding a raw socket to an address

2019-06-09 Thread Greg Kroah-Hartman
From: Mike Manning [ Upstream commit 72f7cfab6f93a8ea825fab8ccfb016d064269f7f ] IPv6 does not consider if the socket is bound to a device when binding to an address. The result is that a socket can be bound to eth0 and then bound to the address of eth1. If the device is a VRF, the result is

[PATCH 4.9 37/83] powerpc/perf: Fix MMCRA corruption by bhrb_filter

2019-06-09 Thread Greg Kroah-Hartman
From: Ravi Bangoria commit 3202e35ec1c8fc19cea24253ff83edf702a60a02 upstream. Consider a scenario where user creates two events: 1st event: attr.sample_type |= PERF_SAMPLE_BRANCH_STACK; attr.branch_sample_type = PERF_SAMPLE_BRANCH_ANY; fd = perf_event_open(attr, 0, 1, -1, 0);

[PATCH 4.9 14/83] crypto: vmx - ghash: do nosimd fallback manually

2019-06-09 Thread Greg Kroah-Hartman
From: Daniel Axtens commit 357d065a44cdd77ed5ff35155a989f2a763e96ef upstream. VMX ghash was using a fallback that did not support interleaving simd and nosimd operations, leading to failures in the extended test suite. If I understood correctly, Eric's suggestion was to use the same data

[PATCH 4.9 31/83] media: usb: siano: Fix general protection fault in smsusb

2019-06-09 Thread Greg Kroah-Hartman
From: Alan Stern commit 31e0456de5be379b10fea0fa94a681057114a96e upstream. The syzkaller USB fuzzer found a general-protection-fault bug in the smsusb part of the Siano DVB driver. The fault occurs during probe because the driver assumes without checking that the device has both IN and OUT

[PATCH 4.9 34/83] scsi: zfcp: fix missing zfcp_port reference put on -EBUSY from port_remove

2019-06-09 Thread Greg Kroah-Hartman
From: Steffen Maier commit d27e5e07f9c49bf2a6a4ef254ce531c1b4fb5a38 upstream. With this early return due to zfcp_unit child(ren), we don't use the zfcp_port reference from the earlier zfcp_get_port_by_wwpn() anymore and need to put it. Signed-off-by: Steffen Maier Fixes: d99b601b6338 ("[SCSI]

[PATCH 4.9 07/83] tipc: Avoid copying bytes beyond the supplied data

2019-06-09 Thread Greg Kroah-Hartman
From: Chris Packham TLV_SET is called with a data pointer and a len parameter that tells us how many bytes are pointed to by data. When invoking memcpy() we need to careful to only copy len bytes. Previously we would copy TLV_LENGTH(len) bytes which would copy an extra 4 bytes past the end of

[PATCH 4.9 18/83] sparc64: Fix regression in non-hypervisor TLB flush xcall

2019-06-09 Thread Greg Kroah-Hartman
From: James Clarke commit d3c976c14ad8af421134c428b0a89ff8dd3bd8f8 upstream. Previously, %g2 would end up with the value PAGE_SIZE, but after the commit mentioned below it ends up with the value 1 due to being reused for a different purpose. We need it to be PAGE_SIZE as we use it to step

[PATCH 4.9 17/83] tipc: fix modprobe tipc failed after switch order of device registration

2019-06-09 Thread Greg Kroah-Hartman
From: Junwei Hu commit 526f5b851a96566803ee4bee60d0a34df56c77f8 upstream. Error message printed: modprobe: ERROR: could not insert 'tipc': Address family not supported by protocol. when modprobe tipc after the following patch: switch order of device registration, commit 7e27e8d6130c ("tipc:

[PATCH 4.9 42/83] memcg: make it work on sparse non-0-node systems

2019-06-09 Thread Greg Kroah-Hartman
From: Jiri Slaby commit 3e8589963773a5c23e2f1fe4bcad0e9a90b7f471 upstream. We have a single node system with node 0 disabled: Scanning NUMA topology in Northbridge 24 Number of physical nodes 2 Skipping disabled node 0 Node 1 MemBase Limit fbff

[PATCH 4.9 51/83] brcmfmac: add subtype check for event handling in data path

2019-06-09 Thread Greg Kroah-Hartman
From: Arend van Spriel commit a4176ec356c73a46c07c181c6d04039fafa34a9f upstream. For USB there is no separate channel being used to pass events from firmware to the host driver and as such are passed over the data path. In order to detect mock event messages an additional check is needed on

[PATCH 4.9 52/83] binder: Replace "%p" with "%pK" for stable

2019-06-09 Thread Greg Kroah-Hartman
From: Ben Hutchings This was done as part of upstream commits fdfb4a99b6ab "8inder: separate binder allocator structure from binder proc", 19c987241ca1 "binder: separate out binder_alloc functions", and 7a4408c6bd3e "binder: make sure accesses to proc/thread are safe". However, those commits

[PATCH 4.9 45/83] staging: vc04_services: prevent integer overflow in create_pagelist()

2019-06-09 Thread Greg Kroah-Hartman
From: Dan Carpenter commit ca641bae6da977d638458e78cd1487b6160a2718 upstream. The create_pagelist() "count" parameter comes from the user in vchiq_ioctl() and it could overflow. If you look at how create_page() is called in vchiq_prepare_bulk_data(), then the "size" variable is an int so it

[PATCH 4.9 56/83] mm, gup: ensure real head page is ref-counted when using hugepages

2019-06-09 Thread Greg Kroah-Hartman
From: Punit Agrawal commit d63206ee32b6e64b0e12d46e5d6004afd9913713 upstream. When speculatively taking references to a hugepage using page_cache_add_speculative() in gup_huge_pmd(), it is assumed that the page returned by pmd_page() is the head page. Although normally true, this assumption

[PATCH 4.9 48/83] drm/vmwgfx: Dont send drm sysfs hotplug events on initial master set

2019-06-09 Thread Greg Kroah-Hartman
From: Thomas Hellstrom commit 63cb1826e842b7285575b96db631cc9f2505 upstream. This may confuse user-space clients like plymouth that opens a drm file descriptor as a result of a hotplug event and then generates a new event... Cc: Fixes: 5ea1734827bb ("drm/vmwgfx: Send a hotplug event at

[PATCH 4.9 47/83] gcc-plugins: Fix build failures under Darwin host

2019-06-09 Thread Greg Kroah-Hartman
From: Kees Cook commit 7210e060155b9cf557fb13128353c3e494fa5ed3 upstream. The gcc-common.h file did not take into account certain macros that might have already been defined in the build environment. This updates the header to avoid redefining the macros, as seen on a Darwin host using gcc

[PATCH 4.9 30/83] USB: rio500: fix memory leak in close after disconnect

2019-06-09 Thread Greg Kroah-Hartman
From: Oliver Neukum commit e0feb73428b69322dd5caae90b0207de369b5575 upstream. If a disconnected device is closed, rio_close() must free the buffers. Signed-off-by: Oliver Neukum Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/usb/misc/rio500.c | 17 +++-- 1 file

[PATCH 4.9 57/83] mm: prevent get_user_pages() from overflowing page refcount

2019-06-09 Thread Greg Kroah-Hartman
From: Linus Torvalds commit 8fde12ca79aff9b5ba951fce1a2641901b8d8e64 upstream. If the page refcount wraps around past zero, it will be freed while there are still four billion references to it. One of the possible avenues for an attacker to try to make this happen is by doing direct IO on a

[PATCH 4.9 28/83] USB: Add LPM quirk for Surface Dock GigE adapter

2019-06-09 Thread Greg Kroah-Hartman
From: Maximilian Luz commit ea261113385ac0a71c2838185f39e8452d54b152 upstream. Without USB_QUIRK_NO_LPM ethernet will not work and rtl8152 will complain with r8152 : Stop submitting intr, status -71 Adding the quirk resolves this. As the dock is externally powered, this should not have

[PATCH 4.9 71/83] rcu: locking and unlocking need to always be at least barriers

2019-06-09 Thread Greg Kroah-Hartman
From: Linus Torvalds commit 66be4e66a7f422128748e3c3ef6ee72b20a6197b upstream. Herbert Xu pointed out that commit bb73c52bad36 ("rcu: Don't disable preemption for Tiny and Tree RCU readers") was incorrect in making the preempt_disable/enable() be conditional on CONFIG_PREEMPT_COUNT. If

[PATCH 4.9 70/83] Revert "fib_rules: return 0 directly if an exactly same rule exists when NLM_F_EXCL not supplied"

2019-06-09 Thread Greg Kroah-Hartman
From: Hangbin Liu [ Upstream commit 4970b42d5c362bf873982db7d93245c5281e58f4 ] This reverts commit e9919a24d3022f72bcadc407e73a6ef17093a849. Nathan reported the new behaviour breaks Android, as Android just add new rules and delete old ones. If we return 0 without adding dup rules, Android

[PATCH 4.9 59/83] Revert "x86/build: Move _etext to actual end of .text"

2019-06-09 Thread Greg Kroah-Hartman
From: Greg Kroah-Hartman This reverts commit 392bef709659abea614abfe53cf228e7a59876a4. It seems to cause lots of problems when using the gold linker, and no one really needs this at the moment, so just revert it from the stable trees. Cc: Sami Tolvanen Reported-by: Kees Cook Cc: Borislav

[PATCH 4.9 58/83] mm: make page ref count overflow check tighter and more explicit

2019-06-09 Thread Greg Kroah-Hartman
From: Linus Torvalds commit f958d7b528b1b40c44cfda5eabe2d82760d868c3 upstream. We have a VM_BUG_ON() to check that the page reference count doesn't underflow (or get close to overflow) by checking the sign of the count. That's all fine, but we actually want to allow people to use a "get page

[PATCH 4.4 000/241] 4.4.181-stable review

2019-06-09 Thread Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.4.181 release. There are 241 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 Tue 11 Jun 2019 04:39:53 PM UTC. Anything

[PATCH 4.4 003/241] ARM: exynos: Fix a leaked reference by adding missing of_node_put

2019-06-09 Thread Greg Kroah-Hartman
From: Wen Yang commit 629266bf7229cd6a550075f5961f95607b823b59 upstream. The call to of_get_next_child returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with warnings like:

[PATCH 4.4 019/241] bcache: fix a race between cache register and cacheset unregister

2019-06-09 Thread Greg Kroah-Hartman
From: Liang Chen commit a4b732a248d12cbdb46999daf0bf288c011335eb upstream. There is a race between cache device register and cache set unregister. For an already registered cache device, register_bcache will call bch_is_open to iterate through all cachesets and check every cache there. The race

[PATCH 4.9 62/83] ethtool: fix potential userspace buffer overflow

2019-06-09 Thread Greg Kroah-Hartman
From: Vivien Didelot [ Upstream commit 0ee4e76937d69128a6a66861ba393ebdc2ffc8a2 ] ethtool_get_regs() allocates a buffer of size ops->get_regs_len(), and pass it to the kernel driver via ops->get_regs() for filling. There is no restriction about what the kernel drivers can or cannot do with the

[PATCH 4.4 024/241] crypto: chacha20poly1305 - set cra_name correctly

2019-06-09 Thread Greg Kroah-Hartman
From: Eric Biggers commit 5e27f38f1f3f45a0c938299c3a34a2d2db77165a upstream. If the rfc7539 template is instantiated with specific implementations, e.g. "rfc7539(chacha20-generic,poly1305-generic)" rather than "rfc7539(chacha20,poly1305)", then the implementation names end up included in the

[PATCH 4.4 016/241] ext4: actually request zeroing of inode table after grow

2019-06-09 Thread Greg Kroah-Hartman
From: Kirill Tkhai commit 310a997fd74de778b9a4848a64be9cda9f18764a upstream. It is never possible, that number of block groups decreases, since only online grow is supported. But after a growing occured, we have to zero inode tables for just created new block groups. Fixes: 19c5246d2516

[PATCH 4.4 020/241] bcache: never set KEY_PTRS of journal key to 0 in journal_reclaim()

2019-06-09 Thread Greg Kroah-Hartman
From: Coly Li commit 1bee2addc0c8470c8aaa65ef0599eeae96dd88bc upstream. In journal_reclaim() ja->cur_idx of each cache will be update to reclaim available journal buckets. Variable 'int n' is used to count how many cache is successfully reclaimed, then n is set to c->journal.key by

[PATCH 4.4 033/241] net/mlx4_core: Change the error print to info print

2019-06-09 Thread Greg Kroah-Hartman
From: Yunjian Wang [ Upstream commit 00f9fec48157f3734e52130a119846e67a12314b ] The error print within mlx4_flow_steer_promisc_add() should be a info print. Fixes: 592e49dda812 ('net/mlx4: Implement promiscuous mode with device managed flow-steering') Signed-off-by: Yunjian Wang Reviewed-by:

[PATCH 4.4 053/241] perf intel-pt: Fix sample timestamp wrt non-taken branches

2019-06-09 Thread Greg Kroah-Hartman
From: Adrian Hunter commit 1b6599a9d8e6c9f7e9b0476012383b1777f7fc93 upstream. The sample timestamp is updated to ensure that the timestamp represents the time of the sample and not a branch that the decoder is still walking towards. The sample timestamp is updated when the decoder returns, but

[PATCH 4.4 025/241] crypto: salsa20 - dont access already-freed walk.iv

2019-06-09 Thread Greg Kroah-Hartman
From: Eric Biggers commit edaf28e996af69222b2cb40455dbb5459c2b875a upstream. If the user-provided IV needs to be aligned to the algorithm's alignmask, then skcipher_walk_virt() copies the IV into a new aligned buffer walk.iv. But skcipher_walk_virt() can fail afterwards, and then if the caller

[PATCH 4.4 008/241] ALSA: hda/hdmi - Consider eld_valid when reporting jack event

2019-06-09 Thread Greg Kroah-Hartman
From: Hui Wang commit 7f641e26a6df9269cb25dd7a4b0a91d6586ed441 upstream. On the machines with AMD GPU or Nvidia GPU, we often meet this issue: after s3, there are 4 HDMI/DP audio devices in the gnome-sound-setting even there is no any monitors plugged. When this problem happens, we check the

[PATCH 4.4 043/241] NFS4: Fix v4.0 client state corruption when mount

2019-06-09 Thread Greg Kroah-Hartman
From: ZhangXiaoxu commit f02f3755dbd14fb935d24b14650fff9ba92243b8 upstream. stat command with soft mount never return after server is stopped. When alloc a new client, the state of the client will be set to NFS4CLNT_LEASE_EXPIRED. When the server is stopped, the state manager will work, and

[PATCH 4.4 014/241] mfd: da9063: Fix OTP control register names to match datasheets for DA9063/63L

2019-06-09 Thread Greg Kroah-Hartman
From: Steve Twiss commit 6b4814a9451add06d457e198be418bf6a3e6a990 upstream. Mismatch between what is found in the Datasheets for DA9063 and DA9063L provided by Dialog Semiconductor, and the register names provided in the MFD registers file. The changes are for the OTP (one-time-programming)

[PATCH 4.4 009/241] ALSA: hda/realtek - EAPD turn on later

2019-06-09 Thread Greg Kroah-Hartman
From: Kailang Yang commit 607ca3bd220f4022e6f5356026b19dafc363863a upstream. Let EAPD turn on after set pin output. [ NOTE: This change is supposed to reduce the possible click noises at (runtime) PM resume. The functionality should be same (i.e. the verbs are executed correctly) no

[PATCH 4.4 039/241] intel_th: msu: Fix single mode with IOMMU

2019-06-09 Thread Greg Kroah-Hartman
From: Alexander Shishkin commit 4e0eaf239fb33ebc671303e2b736fa043462e2f4 upstream. Currently, the pages that are allocated for the single mode of MSC are not mapped into the device's dma space and the code is incorrectly using *_to_phys() in place of a dma address. This fails with IOMMU enabled

[PATCH 4.4 057/241] fbdev: sm712fb: fix boot screen glitch when sm712fb replaces VGA

2019-06-09 Thread Greg Kroah-Hartman
From: Yifeng Li commit ec1587d5073f29820e358f3a383850d61601d981 upstream. When the machine is booted in VGA mode, loading sm712fb would cause a glitch of random pixels shown on the screen. To prevent it from happening, we first clear the entire framebuffer, and we also need to stop calling

[PATCH 4.4 056/241] fbdev: sm712fb: fix white screen of death on reboot, dont set CR3B-CR3F

2019-06-09 Thread Greg Kroah-Hartman
From: Yifeng Li commit 8069053880e0ee3a75fd6d7e0a30293265fe3de4 upstream. On a Thinkpad s30 (Pentium III / i440MX, Lynx3DM), rebooting with sm712fb framebuffer driver would cause a white screen of death on the next POST, presumably the proper timings for the LCD panel was not reprogrammed

[PATCH 4.4 012/241] mm/mincore.c: make mincore() more conservative

2019-06-09 Thread Greg Kroah-Hartman
From: Jiri Kosina commit 134fca9063ad4851de767d1768180e5dede9a881 upstream. The semantics of what mincore() considers to be resident is not completely clear, but Linux has always (since 2.3.52, which is when mincore() was initially done) treated it as "page is available in page cache". That's

[PATCH 4.4 054/241] fbdev: sm712fb: fix brightness control on reboot, dont set SR30

2019-06-09 Thread Greg Kroah-Hartman
From: Yifeng Li commit 5481115e25e42b9215f2619452aa99c95f08492f upstream. On a Thinkpad s30 (Pentium III / i440MX, Lynx3DM), rebooting with sm712fb framebuffer driver would cause the role of brightness up/down button to swap. Experiments showed the FPR30 register caused this behavior.

[PATCH 4.4 060/241] fbdev: sm712fb: use 1024x768 by default on non-MIPS, fix garbled display

2019-06-09 Thread Greg Kroah-Hartman
From: Yifeng Li commit 4ed7d2ccb7684510ec5f7a8f7ef534bc6a3d55b2 upstream. Loongson MIPS netbooks use 1024x600 LCD panels, which is the original target platform of this driver, but nearly all old x86 laptops have 1024x768. Lighting 768 panels using 600's timings would partially garble the

[PATCH 4.4 035/241] tipc: switch order of device registration to fix a crash

2019-06-09 Thread Greg Kroah-Hartman
From: Junwei Hu [ Upstream commit 7e27e8d6130c5e88fac9ddec4249f7f2337fe7f8 ] When tipc is loaded while many processes try to create a TIPC socket, a crash occurs: PANIC: Unable to handle kernel paging request at virtual address "dfff221d" pc : tipc_sk_create+0x374/0x1180 [tipc] lr :

[PATCH 4.4 066/241] vti4: ipip tunnel deregistration fixes.

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit 5483844c3fc18474de29f5d6733003526e0a9f78 ] If tunnel registration failed during module initialization, the module would fail to deregister the IPPROTO_COMP protocol and would attempt to deregister the tunnel. The tunnel was not deregistered during module-exit. Fixes:

[PATCH 4.4 063/241] dm delay: fix a crash when invalid device is specified

2019-06-09 Thread Greg Kroah-Hartman
From: Mikulas Patocka commit 81bc6d150ace6250503b825d9d0c10f7bbd24095 upstream. When the target line contains an invalid device, delay_ctr() will call delay_dtr() with NULL workqueue. Attempting to destroy the NULL workqueue causes a crash. Signed-off-by: Mikulas Patocka Cc:

[PATCH 4.4 064/241] xfrm: policy: Fix out-of-bound array accesses in __xfrm_policy_unlink

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit b805d78d300bcf2c83d6df7da0c818b0fee41427 ] UBSAN report this: UBSAN: Undefined behaviour in net/xfrm/xfrm_policy.c:1289:24 index 6 is out of range for type 'unsigned int [6]' CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.4.162-514.55.6.9.x86_64+ #13 Hardware name: QEMU Standard

[PATCH 4.4 081/241] gfs2: Fix sign extension bug in gfs2_update_stats

2019-06-09 Thread Greg Kroah-Hartman
From: Andreas Gruenbacher commit 5a5ec83d6ac974b12085cd99b196795f14079037 upstream. Commit 4d207133e9c3 changed the types of the statistic values in struct gfs2_lkstats from s64 to u64. Because of that, what should be a signed value in gfs2_update_stats turned into an unsigned value. When

[PATCH 4.4 067/241] xfrm4: Fix uninitialized memory read in _decode_session4

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit 8742dc86d0c7a9628117a989c11f04a9b6b898f3 ] We currently don't reload pointers pointing into skb header after doing pskb_may_pull() in _decode_session4(). So in case pskb_may_pull() changed the pointers, we read from random memory. Fix this by putting all the needed infos on the

[PATCH 4.4 070/241] ufs: fix braino in ufs_get_inode_gid() for solaris UFS flavour

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit 4e9036042fedaffcd868d7f7aa948756c48c637d ] To choose whether to pick the GID from the old (16bit) or new (32bit) field, we should check if the old gid field is set to 0x. Mainline checks the old *UID* field instead - cut'n'paste from the corresponding code in

[PATCH 4.4 047/241] iommu/tegra-smmu: Fix invalid ASID bits on Tegra30/114

2019-06-09 Thread Greg Kroah-Hartman
From: Dmitry Osipenko commit 43a0541e312f7136e081e6bf58f6c8a2e9672688 upstream. Both Tegra30 and Tegra114 have 4 ASID's and the corresponding bitfield of the TLB_FLUSH register differs from later Tegra generations that have 128 ASID's. In a result the PTE's are now flushed correctly from TLB

[PATCH 4.4 051/241] perf intel-pt: Fix instructions sampling rate

2019-06-09 Thread Greg Kroah-Hartman
From: Adrian Hunter commit 7ba8fa20e26eb3c0c04d747f7fd2223694eac4d5 upstream. The timestamp used to determine if an instruction sample is made, is an estimate based on the number of instructions since the last known timestamp. A consequence is that it might go backwards, which results in extra

[PATCH 4.4 084/241] fbdev: fix divide error in fb_var_to_videomode

2019-06-09 Thread Greg Kroah-Hartman
From: Shile Zhang commit cf84807f6dd0be5214378e66460cfc9187f532f9 upstream. To fix following divide-by-zero error found by Syzkaller: divide error: [#1] SMP PTI CPU: 7 PID: 8447 Comm: test Kdump: loaded Not tainted 4.19.24-8.al7.x86_64 #1 Hardware name: Alibaba Cloud Alibaba Cloud

[PATCH 4.4 046/241] fuse: honor RLIMIT_FSIZE in fuse_file_fallocate

2019-06-09 Thread Greg Kroah-Hartman
From: Liu Bo commit 0cbade024ba501313da3b7e5dd2a188a6bc491b5 upstream. fstests generic/228 reported this failure that fuse fallocate does not honor what 'ulimit -f' has set. This adds the necessary inode_newsize_ok() check. Signed-off-by: Liu Bo Fixes: 05ba1f082300 ("fuse: add FALLOCATE

[PATCH 4.4 082/241] Btrfs: fix race between ranged fsync and writeback of adjacent ranges

2019-06-09 Thread Greg Kroah-Hartman
From: Filipe Manana commit 0c713cbab6200b0ab6473b50435e450a6e1de85d upstream. When we do a full fsync (the bit BTRFS_INODE_NEEDS_FULL_SYNC is set in the inode) that happens to be ranged, which happens during a msync() or writes for files opened with O_SYNC for example, we can end up with a

[PATCH 4.4 087/241] media: cpia2: Fix use-after-free in cpia2_exit

2019-06-09 Thread Greg Kroah-Hartman
From: YueHaibing commit dea37a97265588da604c6ba80160a287b72c7bfd upstream. Syzkaller report this: BUG: KASAN: use-after-free in sysfs_remove_file_ns+0x5f/0x70 fs/sysfs/file.c:468 Read of size 8 at addr 8881f59a6b70 by task syz-executor.0/8363 CPU: 0 PID: 8363 Comm: syz-executor.0 Not

[PATCH 4.4 103/241] mac80211/cfg80211: update bss channel on channel switch

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit 5dc8cdce1d722c733f8c7af14c5fb595cfedbfa8 ] FullMAC STAs have no way to update bss channel after CSA channel switch completion. As a result, user-space tools may provide inconsistent channel info. For instance, consider the following two commands: $ sudo iw dev wlan0 link $ sudo

[PATCH 4.4 100/241] rtc: 88pm860x: prevent use-after-free on device remove

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit f22b1ba15ee5785aa028384ebf77dd39e8e47b70 ] The device's remove() attempts to shut down the delayed_work scheduled on the kernel-global workqueue by calling flush_scheduled_work(). Unfortunately, flush_scheduled_work() does not prevent the delayed_work from re-scheduling itself.

[PATCH 4.4 106/241] net: cw1200: fix a NULL pointer dereference

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit 0ed2a005347400500a39ea7c7318f1fea57fb3ca ] In case create_singlethread_workqueue fails, the fix free the hardware and returns NULL to avoid NULL pointer dereference. Signed-off-by: Kangjie Lu Signed-off-by: Kalle Valo Signed-off-by: Sasha Levin ---

[PATCH 4.4 109/241] bcache: add failure check to run_cache_set() for journal replay

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit ce3e4cfb59cb382f8e5ce359238aa580d4ae7778 ] Currently run_cache_set() has no return value, if there is failure in bch_journal_replay(), the caller of run_cache_set() has no idea about such failure and just continue to execute following code after run_cache_set(). The internal

[PATCH 4.4 122/241] audit: fix a memory leak bug

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit 70c4cf17e445264453bc5323db3e50aa0ac9e81f ] In audit_rule_change(), audit_data_to_entry() is firstly invoked to translate the payload data to the kernel's rule representation. In audit_data_to_entry(), depending on the audit field type, an audit tree may be created in

[PATCH 4.4 116/241] pinctrl: pistachio: fix leaked of_node references

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit 44a4455ac2c6b0981eace683a2b6eccf47689022 ] The call to of_get_child_by_name returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings:

[PATCH 4.4 128/241] USB: core: Dont unbind interfaces following device reset failure

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit 381419fa720060ba48b7bbc483be787d5b1dca6f ] The SCSI core does not like to have devices or hosts unregistered while error recovery is in progress. Trying to do so can lead to self-deadlock: Part of the removal code tries to obtain a lock already held by the error handler. This

[PATCH 4.4 114/241] mm/uaccess: Use unsigned long to placate UBSAN warnings on older GCC versions

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit 29da93fea3ea39ab9b12270cc6be1b70ef201c9e ] Randy reported objtool triggered on his (GCC-7.4) build: lib/strncpy_from_user.o: warning: objtool: strncpy_from_user()+0x315: call to __ubsan_handle_add_overflow() with UACCESS enabled lib/strnlen_user.o: warning: objtool:

[PATCH 4.4 124/241] media: pvrusb2: Prevent a buffer overflow

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit c1ced46c7b49ad7bc064e68d966e0ad303f917fb ] The ctrl_check_input() function is called from pvr2_ctrl_range_check(). It's supposed to validate user supplied input and return true or false depending on whether the input is valid or not. The problem is that negative shifts or

[PATCH 4.4 117/241] dmaengine: at_xdmac: remove BUG_ON macro in tasklet

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit e2c114c06da2d9ffad5b16690abf008d6696f689 ] Even if this case shouldn't happen when controller is properly programmed, it's still better to avoid dumping a kernel Oops for this. As the sequence may happen only for debugging purposes, log the error and just finish the tasklet

[PATCH 4.4 126/241] sched/core: Check quota and period overflow at usec to nsec conversion

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit 1a8b4540db732ca16c9e43ac7c08b1b8f0b252d8 ] Large values could overflow u64 and pass following sanity checks. # echo 1844674407375 > cpu.cfs_period_us # cat cpu.cfs_period_us 40448 # echo 1844674407375 > cpu.cfs_quota_us # cat cpu.cfs_quota_us 40448 After this

[PATCH 4.4 112/241] smpboot: Place the __percpu annotation correctly

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit d4645d30b50d1691c26ff0f8fa4e718b08f8d3bb ] The test robot reported a wrong assignment of a per-CPU variable which it detected by using sparse and sent a report. The assignment itself is correct. The annotation for sparse was wrong and hence the report. The first pointer is a

[PATCH 4.4 095/241] mmc: core: Verify SD bus width

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit 9e4be8d03f50d1b25c38e2b59e73b194c130df7d ] The SD Physical Layer Spec says the following: Since the SD Memory Card shall support at least the two bus modes 1-bit or 4-bit width, then any SD Card shall set at least bits 0 and 2 (SD_BUS_WIDTH="0101"). This change verifies the

[PATCH 4.4 130/241] i40e: dont allow changes to HW VLAN stripping on active port VLANs

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit bfb0ebed53857cfc57f11c63fa3689940d71c1c8 ] Modifying the VLAN stripping options when a port VLAN is configured will break traffic for the VSI, and conceptually doesn't make sense, so don't allow this. Signed-off-by: Nicholas Nunley Signed-off-by: Jeff Kirsher Signed-off-by:

[PATCH 4.4 147/241] x86/build: Keep local relocations with ld.lld

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit 7c21383f3429dd70da39c0c7f1efa12377a47ab6 ] The LLVM linker (ld.lld) defaults to removing local relocations, which causes KASLR boot failures. ld.bfd and ld.gold already handle this correctly. This adds the explicit instruction "--discard-none" during the link phase. There is no

[PATCH 4.4 150/241] iio: common: ssp_sensors: Initialize calculated_time in ssp_common_process_data

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit 6f9ca1d3eb74b81f811a87002de2d51640d135b1 ] When building with -Wsometimes-uninitialized, Clang warns: drivers/iio/common/ssp_sensors/ssp_iio.c:95:6: warning: variable 'calculated_time' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] While it

[PATCH 4.4 159/241] x86/ia32: Fix ia32_restore_sigcontext() AC leak

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit 67a0514afdbb8b2fc70b771b8c77661a9cb9d3a9 ] Objtool spotted that we call native_load_gs_index() with AC set. Re-arrange the code to avoid that. Signed-off-by: Peter Zijlstra (Intel) Cc: Borislav Petkov Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas

[PATCH 4.4 155/241] brcmfmac: fix race during disconnect when USB completion is in progress

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit db3b9e2e1d58080d0754bdf9293dabf8c6491b67 ] It was observed that rarely during USB disconnect happening shortly after connect (before full initialization completes) usb_hub_wq would wait forever for the dev_init_lock to be unlocked. dev_init_lock would remain locked though

[PATCH 4.4 168/241] tty: ipwireless: fix missing checks for ioremap

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit 1bbb1c318cd8a3a39e8c3e2e83d5e90542d6c3e3 ] ipw->attr_memory and ipw->common_memory are assigned with the return value of ioremap. ioremap may fail, but no checks are enforced. The fix inserts the checks to avoid potential NULL pointer dereferences. Signed-off-by: Kangjie Lu

[PATCH 4.4 162/241] ASoC: eukrea-tlv320: fix a leaked reference by adding missing of_node_put

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit b820d52e7eed7b30b2dfef5f4213a2bc3cbea6f3 ] The call to of_parse_phandle returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings: ./sound/soc/fsl/eukrea-tlv320.c:121:3-9:

[PATCH 4.4 175/241] scsi: lpfc: Fix SLI3 commands being issued on SLI4 devices

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit c95a3b4b0fb8d351e2329a96f87c4fc96a149505 ] During debug, it was seen that the driver is issuing commands specific to SLI3 on SLI4 devices. Although the adapter correctly rejected the command, this should not be done. Revise the code to stop sending these commands on a SLI4

[PATCH 4.4 176/241] spi : spi-topcliff-pch: Fix to handle empty DMA buffers

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit f37d8e67f39e6d3eaf4cc5471e8a3d21209843c6 ] pch_alloc_dma_buf allocated tx, rx DMA buffers which can fail. Further, these buffers are used without a check. The patch checks for these failures and sends the error upstream. Signed-off-by: Aditya Pakki Signed-off-by: Mark Brown

[PATCH 4.4 179/241] ASoC: davinci-mcasp: Fix clang warning without CONFIG_PM

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit 8ca5104715cfd14254ea5aecc390ae583b707607 ] Building with clang shows a variable that is only used by the suspend/resume functions but defined outside of their #ifdef block: sound/soc/ti/davinci-mcasp.c:48:12: error: variable 'context_regs' is not needed and will not be emitted

Re: [PATCH v6 09/10] mm: stop setting page->mem_cgroup pointer for slab pages

2019-06-09 Thread Vladimir Davydov
On Tue, Jun 04, 2019 at 07:44:53PM -0700, Roman Gushchin wrote: > Every slab page charged to a non-root memory cgroup has a pointer > to the memory cgroup and holds a reference to it, which protects > a non-empty memory cgroup from being released. At the same time > the page has a pointer to the

[PATCH 4.4 177/241] spi: rspi: Fix sequencer reset during initialization

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit 26843bb128590edd7eba1ad7ce22e4b9f1066ce3 ] While the sequencer is reset after each SPI message since commit 880c6d114fd79a69 ("spi: rspi: Add support for Quad and Dual SPI Transfers on QSPI"), it was never reset for the first message, thus relying on reset state or bootloader

[PATCH 4.4 171/241] scsi: qla4xxx: avoid freeing unallocated dma memory

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit 608f729c31d4caf52216ea00d20092a80959256d ] Clang -Wuninitialized notices that on is_qla40XX we never allocate any DMA memory in get_fw_boot_info() but attempt to free it anyway: drivers/scsi/qla4xxx/ql4_os.c:5915:7: error: variable 'buf_dma' is used uninitialized whenever 'if'

[PATCH 4.4 165/241] spi: tegra114: reset controller on probe

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit 01919499b3e9b486639c8cb3692020844d65 ] Fixes: SPI driver can be built as module so perform SPI controller reset on probe to make sure it is in valid state before initiating transfer. Signed-off-by: Sowjanya Komatineni Signed-off-by: Mark Brown Signed-off-by: Sasha Levin

[PATCH 4.4 181/241] llc: fix skb leak in llc_build_and_send_ui_pkt()

2019-06-09 Thread Greg Kroah-Hartman
From: Eric Dumazet [ Upstream commit 8fb44d60d4142cd2a440620cd291d346e23c131e ] If llc_mac_hdr_init() returns an error, we must drop the skb since no llc_build_and_send_ui_pkt() caller will take care of this. BUG: memory leak unreferenced object 0x8881202b6800 (size 2048): comm

[PATCH 4.4 144/241] cpufreq: ppc_cbe: fix possible object reference leak

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit 233298032803f2802fe99892d0de4ab653bfece4 ] The call to of_get_cpu_node returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings: ./drivers/cpufreq/ppc_cbe_cpufreq.c:89:2-8:

Re: [PATCH v6 08/10] mm: rework non-root kmem_cache lifecycle management

2019-06-09 Thread Vladimir Davydov
On Tue, Jun 04, 2019 at 07:44:52PM -0700, Roman Gushchin wrote: > Currently each charged slab page holds a reference to the cgroup to > which it's charged. Kmem_caches are held by the memcg and are released > all together with the memory cgroup. It means that none of kmem_caches > are released

[PATCH 4.4 142/241] extcon: arizona: Disable mic detect if running when driver is removed

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit 00053de52231117ddc154042549f2256183ffb86 ] Microphone detection provides the button detection features on the Arizona CODECs as such it will be running if the jack is currently inserted. If the driver is unbound whilst the jack is still inserted this will cause warnings from the

<    1   2   3   4   5   6   7   8   >