[PATCH 4.19 38/93] ipv4/icmp: fix rt dst dev null pointer dereference

2019-09-04 Thread Greg Kroah-Hartman
From: Hangbin Liu [ Upstream commit e2c693934194fd3b4e795635934883354c06ebc9 ] In __icmp_send() there is a possibility that the rt->dst.dev is NULL, e,g, with tunnel collect_md mode, which will cause kernel crash. Here is what the code path looks like, for GRE: - ip6gre_tunnel_xmit -

[PATCH 4.19 06/93] afs: Only update d_fsdata if different in afs_d_revalidate()

2019-09-04 Thread Greg Kroah-Hartman
[ Upstream commit 5dc84855b0fc7e1db182b55c5564fd539d6eff92 ] In the in-kernel afs filesystem, d_fsdata is set with the data version of the parent directory. afs_d_revalidate() will update this to the current directory version, but it shouldn't do this if it the value it read from d_fsdata is the

[PATCH 4.19 39/93] mm/zsmalloc.c: fix build when CONFIG_COMPACTION=n

2019-09-04 Thread Greg Kroah-Hartman
From: Andrew Morton commit 441e254cd40dc03beec3c650ce6ce6074bc6517f upstream. Fixes: 701d678599d0c1 ("mm/zsmalloc.c: fix race condition in zs_destroy_pool") Link: http://lkml.kernel.org/r/201908251039.5osbeeut%25...@intel.com Reported-by: kbuild test robot Cc: Sergey Senozhatsky Cc: Henry

[PATCH 4.19 05/93] fs: afs: Fix a possible null-pointer dereference in afs_put_read()

2019-09-04 Thread Greg Kroah-Hartman
[ Upstream commit a6eed4ab5dd4bfb696c1a3f49742b8d1846a66a0 ] In afs_read_dir(), there is an if statement on line 255 to check whether req->pages is NULL: if (!req->pages) goto error; If req->pages is NULL, afs_put_read() on line 337 is executed. In afs_put_read(),

[PATCH 4.19 30/93] drm/tilcdc: Register cpufreq notifier after we have initialized crtc

2019-09-04 Thread Greg Kroah-Hartman
[ Upstream commit 432973fd3a20102840d5f7e61af9f1a03c217a4c ] Register cpufreq notifier after we have initialized the crtc and unregister it before we remove the ctrc. Receiving a cpufreq notify without crtc causes a crash. Reported-by: Peter Ujfalusi Signed-off-by: Jyri Sarha Signed-off-by:

[PATCH 4.19 04/93] afs: Fix loop index mixup in afs_deliver_vl_get_entry_by_name_u()

2019-09-04 Thread Greg Kroah-Hartman
[ Upstream commit 4a46fdba449a5cd890271df5a9e23927d519ed00 ] afs_deliver_vl_get_entry_by_name_u() scans through the vl entry received from the volume location server and builds a return list containing the sites that are currently valid. When assigning values for the return list, the index into

[PATCH 4.19 32/93] net/tls: swap sk_write_space on close

2019-09-04 Thread Greg Kroah-Hartman
From: Jakub Kicinski [ Upstream commit 57c722e932cfb82e9820bbaae1b1f7222ea97b52 ] Now that we swap the original proto and clear the ULP pointer on close we have to make sure no callback will try to access the freed state. sk_write_space is not part of sk_prot, remember to swap it. Reported-by:

[PATCH 4.19 31/93] net/tls: Fixed return value when tls_complete_pending_work() fails

2019-09-04 Thread Greg Kroah-Hartman
From: Vakul Garg [ Upstream commit 150085791afb8054e11d2e080d4b9cd755dd7f69 ] In tls_sw_sendmsg() and tls_sw_sendpage(), the variable 'ret' has been set to return value of tls_complete_pending_work(). This allows return of proper error code if tls_complete_pending_work() fails. Fixes:

[PATCH 4.19 33/93] net: tls, fix sk_write_space NULL write when tx disabled

2019-09-04 Thread Greg Kroah-Hartman
From: John Fastabend [ Upstream commit d85f01775850a35eae47a0090839baf510c1ef12 ] The ctx->sk_write_space pointer is only set when TLS tx mode is enabled. When running without TX mode its a null pointer but we still set the sk sk_write_space pointer on close(). Fix the close path to only

[PATCH 4.19 03/93] afs: Fix the CB.ProbeUuid service handler to reply correctly

2019-09-04 Thread Greg Kroah-Hartman
[ Upstream commit 2067b2b3f4846402a040286135f98f46f8919939 ] Fix the service handler function for the CB.ProbeUuid RPC call so that it replies in the correct manner - that is an empty reply for success and an abort of 1 for failure. Putting 0 or 1 in an integer in the body of the reply should

[PATCH 4.19 35/93] ipv6: Default fib6_type to RTN_UNICAST when not set

2019-09-04 Thread Greg Kroah-Hartman
From: David Ahern [ Upstream commit c7036d97acd2527cef145b5ef9ad1a37ed21bbe6 ] A user reported that routes are getting installed with type 0 (RTN_UNSPEC) where before the routes were RTN_UNICAST. One example is from accel-ppp which apparently still uses the ioctl interface and does not set

[PATCH 4.19 20/93] i2c: rcar: avoid race when unregistering slave client

2019-09-04 Thread Greg Kroah-Hartman
[ Upstream commit 7b814d852af6944657c2961039f404c4490771c0 ] After we disabled interrupts, there might still be an active one running. Sync before clearing the pointer to the slave device. Fixes: de20d1857dd6 ("i2c: rcar: add slave support") Reported-by: Krzysztof Adamski Signed-off-by: Wolfram

[PATCH 4.19 22/93] drm/ast: Fixed reboot test may cause system hanged

2019-09-04 Thread Greg Kroah-Hartman
[ Upstream commit 05b439711f6ff8700e8660f97a1179650778b9cb ] There is another thread still access standard VGA I/O while loading drm driver. Disable standard VGA I/O decode to avoid this issue. Signed-off-by: Y.C. Chen Reviewed-by: Benjamin Herrenschmidt Signed-off-by: Dave Airlie Link:

[PATCH 4.19 21/93] i2c: emev2: avoid race when unregistering slave client

2019-09-04 Thread Greg Kroah-Hartman
[ Upstream commit d7437fc0d8291181debe032671a289b6bd93f46f ] After we disabled interrupts, there might still be an active one running. Sync before clearing the pointer to the slave device. Fixes: c31d0a00021d ("i2c: emev2: add slave support") Reported-by: Krzysztof Adamski Signed-off-by:

[PATCH 4.19 23/93] usb: host: fotg2: restart hcd after port reset

2019-09-04 Thread Greg Kroah-Hartman
[ Upstream commit 5ffe59ef754cc39ab2f275dc277732f4 ] On the Gemini SoC the FOTG2 stalls after port reset so restart the HCD after each port reset. Signed-off-by: Hans Ulli Kroll Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20190810150458.817-1-linus.wall...@linaro.org

[PATCH 4.19 24/93] tools: hv: fixed Python pep8/flake8 warnings for lsvmbus

2019-09-04 Thread Greg Kroah-Hartman
[ Upstream commit 5912e791f3018de0a007c8cfa9cb38c97d3e5f5c ] Fixed pep8/flake8 python style code for lsvmbus tool. The TAB indentation was on purpose ignored (pep8 rule W191) to make sure the code is complying with the Linux code guideline. The following command doe not show any warnings now:

[PATCH 4.19 29/93] scsi: ufs: Fix RX_TERMINATION_FORCE_ENABLE define value

2019-09-04 Thread Greg Kroah-Hartman
[ Upstream commit ebcb8f8508c5edf428f52525cec74d28edea7bcb ] Fix RX_TERMINATION_FORCE_ENABLE define value from 0x0089 to 0x00A9 according to MIPI Alliance MPHY specification. Fixes: e785060ea3a1 ("ufs: definitions for phy interface") Signed-off-by: Pedro Sousa Signed-off-by: Martin K. Petersen

[PATCH 4.19 27/93] watchdog: bcm2835_wdt: Fix module autoload

2019-09-04 Thread Greg Kroah-Hartman
[ Upstream commit 215e06f0d18d5d653d6ea269e4dfc684854d48bf ] The commit 5e6acc3e678e ("bcm2835-pm: Move bcm2835-watchdog's DT probe to an MFD.") broke module autoloading on Raspberry Pi. So add a module alias this fix this. Signed-off-by: Stefan Wahren Reviewed-by: Guenter Roeck Signed-off-by:

[PATCH 4.19 18/93] xen/blkback: fix memory leaks

2019-09-04 Thread Greg Kroah-Hartman
[ Upstream commit ae78ca3cf3d9e9f914bfcd0bc5c389ff18b9c2e0 ] In read_per_ring_refs(), after 'req' and related memory regions are allocated, xen_blkif_map() is invoked to map the shared frame, irq, and etc. However, if this mapping process fails, no cleanup is performed, leading to memory leaks.

[PATCH 4.19 16/93] usb: gadget: composite: Clear "suspended" on reset/disconnect

2019-09-04 Thread Greg Kroah-Hartman
[ Upstream commit 602fda17c7356bb7ae98467d93549057481d11dd ] In some cases, one can get out of suspend with a reset or a disconnect followed by a reconnect. Previously we would leave a stale suspended flag set. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Felipe Balbi Signed-off-by:

[PATCH 4.19 17/93] usb: gadget: mass_storage: Fix races between fsg_disable and fsg_set_alt

2019-09-04 Thread Greg Kroah-Hartman
[ Upstream commit 4a56a478a525d6427be90753451c40e1327caa1a ] If fsg_disable() and fsg_set_alt() are called too closely to each other (for example due to a quick reset/reconnect), what can happen is that fsg_set_alt sets common->new_fsg from an interrupt while handle_exception is trying to process

[PATCH 4.19 19/93] arm64: cpufeature: Dont treat granule sizes as strict

2019-09-04 Thread Greg Kroah-Hartman
[ Upstream commit 5717fe5ab38f9ccb32718bcb03bea68409c9cce4 ] If a CPU doesn't support the page size for which the kernel is configured, then we will complain and refuse to bring it online. For secondary CPUs (and the boot CPU on a system booting with EFI), we will also print an error identifying

[PATCH 4.14 44/57] drm/i915: Dont deballoon unused ggtt drm_mm_node in linux guest

2019-09-04 Thread Greg Kroah-Hartman
From: Xiong Zhang commit 0a3dfbb5cd9033752639ef33e319c2f2863c713a upstream. The following call trace may exist in linux guest dmesg when guest i915 driver is unloaded. [ 90.776610] [drm:vgt_deballoon_space.isra.0 [i915]] deballoon space: range [0x0 - 0x0] 0 KiB. [ 90.776621] BUG: unable to

[PATCH 4.14 47/57] Revert "cfg80211: fix processing world regdomain when non modular"

2019-09-04 Thread Greg Kroah-Hartman
From: Hodaszi, Robert commit 0d31d4dbf38412f5b8b11b4511d07b840eebe8cb upstream. This reverts commit 96cce12ff6e0 ("cfg80211: fix processing world regdomain when non modular"). Re-triggering a reg_process_hint with the last request on all events, can make the regulatory domain fail in case of

[PATCH 4.14 56/57] i2c: piix4: Fix port selection for AMD Family 16h Model 30h

2019-09-04 Thread Greg Kroah-Hartman
[ Upstream commit c7c06a1532f3fe106687ac82a13492c6a619ff1c ] Family 16h Model 30h SMBus controller needs the same port selection fix as described and fixed in commit 0fe16195f891 ("i2c: piix4: Fix SMBus port selection for AMD Family 17h chips") commit 6befa3fde65f ("i2c: piix4: Support

[PATCH 4.19 12/93] auxdisplay: panel: need to delete scan_timer when misc_register fails in panel_attach

2019-09-04 Thread Greg Kroah-Hartman
[ Upstream commit b33d567560c1aadf3033290d74d4fd67af47aa61 ] In panel_attach, if misc_register fails, we need to delete scan_timer, which was setup in keypad_init->init_scan_timer. Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Miguel Ojeda Signed-off-by: Sasha Levin ---

[PATCH 4.14 50/57] KVM: arm/arm64: vgic: Fix potential deadlock when ap_list is long

2019-09-04 Thread Greg Kroah-Hartman
[ Upstream commit d4a8061a7c5f7c27a2dc002ee4cb89b3e6637e44 ] If the ap_list is longer than 256 entries, merge_final() in list_sort() will call the comparison callback with the same element twice, causing a deadlock in vgic_irq_cmp(). Fix it by returning early when irqa == irqb. Cc:

[PATCH 4.19 15/93] iommu/dma: Handle SG length overflow better

2019-09-04 Thread Greg Kroah-Hartman
[ Upstream commit ab2cbeb0ed301a9f0460078e91b09f39958212ef ] Since scatterlist dimensions are all unsigned ints, in the relatively rare cases where a device's max_segment_size is set to UINT_MAX, then the "cur_len + s_length <= max_len" check in __finalise_sg() will always return true. As a

[PATCH 4.14 49/57] KVM: PPC: Book3S: Fix incorrect guest-to-user-translation error handling

2019-09-04 Thread Greg Kroah-Hartman
[ Upstream commit ddfd151f3def9258397fcde7a372205a2d661903 ] H_PUT_TCE_INDIRECT handlers receive a page with up to 512 TCEs from a guest. Although we verify correctness of TCEs before we do anything with the existing tables, there is a small window when a check in kvmppc_tce_validate might pass

[PATCH 4.19 13/93] dmaengine: stm32-mdma: Fix a possible null-pointer dereference in stm32_mdma_irq_handler()

2019-09-04 Thread Greg Kroah-Hartman
[ Upstream commit 39c71a5b8212f4b502d9a630c6706ac723abd422 ] In stm32_mdma_irq_handler(), chan is checked on line 1368. When chan is NULL, it is still used on line 1369: dev_err(chan2dev(chan), "MDMA channel not initialized\n"); Thus, a possible null-pointer dereference may occur. To fix

[PATCH 4.19 14/93] omap-dma/omap_vout_vrfb: fix off-by-one fi value

2019-09-04 Thread Greg Kroah-Hartman
[ Upstream commit d555c34338cae844b207564c482e5a3fb089d25e ] The OMAP 4 TRM specifies that when using double-index addressing the address increases by the ES plus the EI value minus 1 within a frame. When a full frame is transferred, the address increases by the ES plus the frame index (FI) value

[PATCH 4.19 11/93] soundwire: cadence_master: fix definitions for INTSTAT0/1

2019-09-04 Thread Greg Kroah-Hartman
[ Upstream commit 664b16589f882202b8fa8149d0074f3159bade76 ] Two off-by-one errors: INTSTAT0 missed BIT(31) and INTSTAT1 is only defined on first 16 bits. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20190725234032.21152-15-pierre-louis.boss...@linux.intel.com

[PATCH 4.14 55/57] NFS: Ensure O_DIRECT reports an error if the bytes read/written is 0

2019-09-04 Thread Greg Kroah-Hartman
[ Upstream commit eb2c50da9e256dbbb3ff27694440e4c1900cfef8 ] If the attempt to resend the I/O results in no bytes being read/written, we must ensure that we report the error. Signed-off-by: Trond Myklebust Fixes: 0a00b77b331a ("nfs: mirroring support for direct io") Cc: sta...@vger.kernel.org #

[PATCH 4.14 53/57] NFSv4/pnfs: Fix a page lock leak in nfs_pageio_resend()

2019-09-04 Thread Greg Kroah-Hartman
[ Upstream commit f4340e9314dbfadc48758945f85fc3b16612d06f ] If the attempt to resend the pages fails, we need to ensure that we clean up those pages that were not transmitted. Fixes: d600ad1f2bdb ("NFS41: pop some layoutget errors to application") Signed-off-by: Trond Myklebust Cc:

[PATCH 4.14 52/57] NFS: Clean up list moves of struct nfs_page

2019-09-04 Thread Greg Kroah-Hartman
[ Upstream commit 078b5fd92c4913dd367361db6c28568386077c89 ] In several places we're just moving the struct nfs_page from one list to another by first removing from the existing list, then adding to the new one. Signed-off-by: Trond Myklebust Signed-off-by: Sasha Levin --- fs/nfs/direct.c

[PATCH 4.14 37/57] USB: storage: ums-realtek: Whitelist auto-delink support

2019-09-04 Thread Greg Kroah-Hartman
From: Kai-Heng Feng commit 1902a01e2bcc3abd7c9a18dc05e78c7ab4a53c54 upstream. Auto-delink requires writing special registers to ums-realtek devices. Unconditionally enable auto-delink may break newer devices. So only enable auto-delink by default for the original three IDs, 0x0138, 0x0158 and

[PATCH 4.14 04/57] usb: gadget: composite: Clear "suspended" on reset/disconnect

2019-09-04 Thread Greg Kroah-Hartman
[ Upstream commit 602fda17c7356bb7ae98467d93549057481d11dd ] In some cases, one can get out of suspend with a reset or a disconnect followed by a reconnect. Previously we would leave a stale suspended flag set. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Felipe Balbi Signed-off-by:

[PATCH 4.14 06/57] xen/blkback: fix memory leaks

2019-09-04 Thread Greg Kroah-Hartman
[ Upstream commit ae78ca3cf3d9e9f914bfcd0bc5c389ff18b9c2e0 ] In read_per_ring_refs(), after 'req' and related memory regions are allocated, xen_blkif_map() is invoked to map the shared frame, irq, and etc. However, if this mapping process fails, no cleanup is performed, leading to memory leaks.

[PATCH 4.14 05/57] usb: gadget: mass_storage: Fix races between fsg_disable and fsg_set_alt

2019-09-04 Thread Greg Kroah-Hartman
[ Upstream commit 4a56a478a525d6427be90753451c40e1327caa1a ] If fsg_disable() and fsg_set_alt() are called too closely to each other (for example due to a quick reset/reconnect), what can happen is that fsg_set_alt sets common->new_fsg from an interrupt while handle_exception is trying to process

[PATCH 4.14 00/57] 4.14.142-stable review

2019-09-04 Thread Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.14.142 release. There are 57 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know. Responses should be made by Fri 06 Sep 2019 05:50:23 PM UTC. Anything

[PATCH 4.14 51/57] KVM: arm/arm64: vgic-v2: Handle SGI bits in GICD_I{S,C}PENDR0 as WI

2019-09-04 Thread Greg Kroah-Hartman
[ Upstream commit 82e40f558de566fdee214bec68096bbd5e64a6a4 ] A guest is not allowed to inject a SGI (or clear its pending state) by writing to GICD_ISPENDR0 (resp. GICD_ICPENDR0), as these bits are defined as WI (as per ARM IHI 0048B 4.3.7 and 4.3.8). Make sure we correctly emulate the

[PATCH 4.14 35/57] usb: host: xhci: rcar: Fix typo in compatible string matching

2019-09-04 Thread Greg Kroah-Hartman
From: Geert Uytterhoeven commit 636bd02a7ba9025ff851d0cfb92768c8fa865859 upstream. It's spelled "renesas", not "renensas". Due to this typo, RZ/G1M and RZ/G1N were not covered by the check. Fixes: 2dc240a3308b ("usb: host: xhci: rcar: retire use of xhci_plat_type_is()") Signed-off-by: Geert

[PATCH 4.14 34/57] usb: host: ohci: fix a race condition between shutdown and irq

2019-09-04 Thread Greg Kroah-Hartman
From: Yoshihiro Shimoda commit a349b95d7ca0cea71be4a7dac29830703de7eb62 upstream. This patch fixes an issue that the following error is possible to happen when ohci hardware causes an interruption and the system is shutting down at the same time. [ 34.851754] usb 2-1: USB disconnect, device

[PATCH 4.14 40/57] mmc: core: Fix init of SD cards reporting an invalid VDD range

2019-09-04 Thread Greg Kroah-Hartman
From: Ulf Hansson commit 72741084d903e65e121c27bd29494d941729d4a1 upstream. The OCR register defines the supported range of VDD voltages for SD cards. However, it has turned out that some SD cards reports an invalid voltage range, for example having bit7 set. When a host supports

[PATCH 4.14 32/57] USB: cdc-wdm: fix race between write and disconnect due to flag abuse

2019-09-04 Thread Greg Kroah-Hartman
From: Oliver Neukum commit 1426bd2c9f7e3126e2678e7469dca9fd9fc6dd3e upstream. In case of a disconnect an ongoing flush() has to be made fail. Nevertheless we cannot be sure that any pending URB has already finished, so although they will never succeed, they still must not be touched. The clean

[PATCH 4.14 09/57] drm/ast: Fixed reboot test may cause system hanged

2019-09-04 Thread Greg Kroah-Hartman
[ Upstream commit 05b439711f6ff8700e8660f97a1179650778b9cb ] There is another thread still access standard VGA I/O while loading drm driver. Disable standard VGA I/O decode to avoid this issue. Signed-off-by: Y.C. Chen Reviewed-by: Benjamin Herrenschmidt Signed-off-by: Dave Airlie Link:

[PATCH 4.14 36/57] USB: storage: ums-realtek: Update module parameter description for auto_delink_en

2019-09-04 Thread Greg Kroah-Hartman
From: Kai-Heng Feng commit f6445b6b2f2bb1745080af4a0926049e8bca2617 upstream. The option named "auto_delink_en" is a bit misleading, as setting it to false doesn't really disable auto-delink but let auto-delink be firmware controlled. Update the description to reflect the real usage of this

[PATCH 4.14 38/57] uprobes/x86: Fix detection of 32-bit user mode

2019-09-04 Thread Greg Kroah-Hartman
[ Upstream commit 9212ec7d8357ea630031e89d0d399c761421c83b ] 32-bit processes running on a 64-bit kernel are not always detected correctly, causing the process to crash when uretprobes are installed. The reason for the crash is that in_ia32_syscall() is used to determine the process's mode,

[PATCH 4.14 08/57] i2c: emev2: avoid race when unregistering slave client

2019-09-04 Thread Greg Kroah-Hartman
[ Upstream commit d7437fc0d8291181debe032671a289b6bd93f46f ] After we disabled interrupts, there might still be an active one running. Sync before clearing the pointer to the slave device. Fixes: c31d0a00021d ("i2c: emev2: add slave support") Reported-by: Krzysztof Adamski Signed-off-by:

[PATCH 4.14 27/57] x86/apic: Include the LDR when clearing out APIC registers

2019-09-04 Thread Greg Kroah-Hartman
From: Bandan Das commit 558682b5291937a70748d36fd9ba757fb25b99ae upstream. Although APIC initialization will typically clear out the LDR before setting it, the APIC cleanup code should reset the LDR. This was discovered with a 32-bit KVM guest jumping into a kdump kernel. The stale bits in the

[PATCH] perf tools: Fix paths in include statements

2019-09-04 Thread Ian Rogers
These paths point to the wrong location but still work because they get picked up by a -I flag that happens to direct to the correct file. Fix paths to lead to the actual file location without help from include flags. Signed-off-by: Ian Rogers --- tools/perf/arch/powerpc/util/perf_regs.c | 4

[PATCH 4.14 31/57] usb-storage: Add new JMS567 revision to unusual_devs

2019-09-04 Thread Greg Kroah-Hartman
From: Henk van der Laan commit 08d676d1685c2a29e4d0e1b0242324e564d4589e upstream. Revision 0x0117 suffers from an identical issue to earlier revisions, therefore it should be added to the quirks list. Signed-off-by: Henk van der Laan Cc: stable Link:

[PATCH 4.14 28/57] ftrace: Fix NULL pointer dereference in t_probe_next()

2019-09-04 Thread Greg Kroah-Hartman
From: Naveen N. Rao commit 7bd46644ea0f6021dc396a39a8bfd3a58f6f1f9f upstream. LTP testsuite on powerpc results in the below crash: Unable to handle kernel paging request for data at address 0x Faulting instruction address: 0xc029d800 Oops: Kernel access of bad area, sig:

[PATCH 4.14 29/57] ftrace: Check for successful allocation of hash

2019-09-04 Thread Greg Kroah-Hartman
From: Naveen N. Rao commit 5b0022dd32b7c2e15edf1827ba80aa1407edf9ff upstream. In register_ftrace_function_probe(), we are not checking the return value of alloc_and_copy_ftrace_hash(). The subsequent call to ftrace_match_records() may end up dereferencing the same. Add a check to ensure this

[PATCH 4.14 03/57] iommu/dma: Handle SG length overflow better

2019-09-04 Thread Greg Kroah-Hartman
[ Upstream commit ab2cbeb0ed301a9f0460078e91b09f39958212ef ] Since scatterlist dimensions are all unsigned ints, in the relatively rare cases where a device's max_segment_size is set to UINT_MAX, then the "cur_len + s_length <= max_len" check in __finalise_sg() will always return true. As a

[PATCH 4.14 26/57] x86/apic: Do not initialize LDR and DFR for bigsmp

2019-09-04 Thread Greg Kroah-Hartman
From: Bandan Das commit bae3a8d3308ee69a7dbdf145911b18dfda8ade0d upstream. Legacy apic init uses bigsmp for smp systems with 8 and more CPUs. The bigsmp APIC implementation uses physical destination mode, but it nevertheless initializes LDR and DFR. The LDR even ends up incorrectly with

[PATCH 4.14 24/57] kvm: x86: skip populating logical dest map if apic is not sw enabled

2019-09-04 Thread Greg Kroah-Hartman
From: Radim Krcmar commit b14c876b994f208b6b95c222056e1deb0a45de0e upstream. recalculate_apic_map does not santize ldr and it's possible that multiple bits are set. In that case, a previous valid entry can potentially be overwritten by an invalid one. This condition is hit when booting a 32

[PATCH 4.14 30/57] ftrace: Check for empty hash and comment the race with registering probes

2019-09-04 Thread Greg Kroah-Hartman
From: Steven Rostedt (VMware) commit 372e0d01da71c84dcecf7028598a33813b0d5256 upstream. The race between adding a function probe and reading the probes that exist is very subtle. It needs a comment. Also, the issue can also happen if the probe has has the EMPTY_HASH as its func_hash. Cc:

[PATCH 4.14 25/57] KVM: x86: Dont update RIP or do single-step on faulting emulation

2019-09-04 Thread Greg Kroah-Hartman
From: Sean Christopherson commit 75ee23b30dc712d80d2421a9a547e7ab6e379b44 upstream. Don't advance RIP or inject a single-step #DB if emulation signals a fault. This logic applies to all state updates that are conditional on clean retirement of the emulation instruction, e.g. updating RFLAGS

[PATCH 4.14 20/57] tcp: make sure EPOLLOUT wont be missed

2019-09-04 Thread Greg Kroah-Hartman
From: Eric Dumazet [ Upstream commit ef8d8ccdc216f797e66cb4a1372f5c4c285ce1e4 ] As Jason Baron explained in commit 790ba4566c1a ("tcp: set SOCK_NOSPACE under memory pressure"), it is crucial we properly set SOCK_NOSPACE when needed. However, Jason patch had a bug, because the 'nonblocking'

[PATCH 4.14 22/57] ALSA: line6: Fix memory leak at line6_init_pcm() error path

2019-09-04 Thread Greg Kroah-Hartman
From: Takashi Iwai commit 1bc8d18c75fef3b478dbdfef722aae09e2a9fde7 upstream. I forgot to release the allocated object at the early error path in line6_init_pcm(). For addressing it, slightly shuffle the code so that the PCM destructor (pcm->private_free) is assigned properly before all error

[PATCH 4.14 02/57] auxdisplay: panel: need to delete scan_timer when misc_register fails in panel_attach

2019-09-04 Thread Greg Kroah-Hartman
[ Upstream commit b33d567560c1aadf3033290d74d4fd67af47aa61 ] In panel_attach, if misc_register fails, we need to delete scan_timer, which was setup in keypad_init->init_scan_timer. Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Miguel Ojeda Signed-off-by: Sasha Levin ---

[PATCH 4.14 21/57] mm/zsmalloc.c: fix build when CONFIG_COMPACTION=n

2019-09-04 Thread Greg Kroah-Hartman
From: Andrew Morton commit 441e254cd40dc03beec3c650ce6ce6074bc6517f upstream. Fixes: 701d678599d0c1 ("mm/zsmalloc.c: fix race condition in zs_destroy_pool") Link: http://lkml.kernel.org/r/201908251039.5osbeeut%25...@intel.com Reported-by: kbuild test robot Cc: Sergey Senozhatsky Cc: Henry

[PATCH 4.14 19/57] net/smc: make sure EPOLLOUT is raised

2019-09-04 Thread Greg Kroah-Hartman
From: Jason Baron [ Upstream commit 4651d1802f7063e4d8c0bcad957f46ece0c04024 ] Currently, we are only explicitly setting SOCK_NOSPACE on a write timeout for non-blocking sockets. Epoll() edge-trigger mode relies on SOCK_NOSPACE being set when -EAGAIN is returned to ensure that EPOLLOUT is

[PATCH 4.14 18/57] ALSA: usb-audio: Fix an OOB bug in parse_audio_mixer_unit

2019-09-04 Thread Greg Kroah-Hartman
From: Hui Peng commit daac07156b330b18eb5071aec4b3ddca1c377f2c upstream. The `uac_mixer_unit_descriptor` shown as below is read from the device side. In `parse_audio_mixer_unit`, `baSourceID` field is accessed from index 0 to `bNrInPins` - 1, the current implementation assumes that descriptor

[PATCH 4.14 15/57] drm/tilcdc: Register cpufreq notifier after we have initialized crtc

2019-09-04 Thread Greg Kroah-Hartman
[ Upstream commit 432973fd3a20102840d5f7e61af9f1a03c217a4c ] Register cpufreq notifier after we have initialized the crtc and unregister it before we remove the ctrc. Receiving a cpufreq notify without crtc causes a crash. Reported-by: Peter Ujfalusi Signed-off-by: Jyri Sarha Signed-off-by:

[PATCH 4.14 16/57] tcp: fix tcp_rtx_queue_tail in case of empty retransmit queue

2019-09-04 Thread Greg Kroah-Hartman
Commit 8c3088f895a0 ("tcp: be more careful in tcp_fragment()") triggers following stack trace: [25244.848046] kernel BUG at ./include/linux/skbuff.h:1406! [25244.859335] RIP: 0010:skb_queue_prev+0x9/0xc [25244.888167] Call Trace: [25244.889182] [25244.890001] tcp_fragment+0x9c/0x2cf

[PATCH 4.14 13/57] drm/bridge: tfp410: fix memleak in get_modes()

2019-09-04 Thread Greg Kroah-Hartman
[ Upstream commit c08f99c39083ab55a9c93b3e93cef48711294dad ] We don't free the edid blob allocated by the call to drm_get_edid(), causing a memleak. Fix this by calling kfree(edid) at the end of the get_modes(). Signed-off-by: Tomi Valkeinen Signed-off-by: Andrzej Hajda Link:

[PATCH 4.14 11/57] tools: hv: fix KVP and VSS daemons exit code

2019-09-04 Thread Greg Kroah-Hartman
[ Upstream commit b0995156071b0ff29a5902964a9dc8cfad6f81c0 ] HyperV KVP and VSS daemons should exit with 0 when the '--help' or '-h' flags are used. Signed-off-by: Adrian Vladu Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Stephen Hemminger Cc: Sasha Levin Cc: Alessandro Pilotti

[PATCH 4.14 10/57] usb: host: fotg2: restart hcd after port reset

2019-09-04 Thread Greg Kroah-Hartman
[ Upstream commit 5ffe59ef754cc39ab2f275dc277732f4 ] On the Gemini SoC the FOTG2 stalls after port reset so restart the HCD after each port reset. Signed-off-by: Hans Ulli Kroll Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20190810150458.817-1-linus.wall...@linaro.org

[PATCH 4.14 01/57] dmaengine: ste_dma40: fix unneeded variable warning

2019-09-04 Thread Greg Kroah-Hartman
[ Upstream commit 5d6fb560729a5d5554e23db8d00eb57cd0021083 ] clang-9 points out that there are two variables that depending on the configuration may only be used in an ARRAY_SIZE() expression but not referenced: drivers/dma/ste_dma40.c:145:12: error: variable 'd40_backup_regs' is not needed and

[PATCH 4.9 82/83] i2c: piix4: Fix port selection for AMD Family 16h Model 30h

2019-09-04 Thread Greg Kroah-Hartman
[ Upstream commit c7c06a1532f3fe106687ac82a13492c6a619ff1c ] Family 16h Model 30h SMBus controller needs the same port selection fix as described and fixed in commit 0fe16195f891 ("i2c: piix4: Fix SMBus port selection for AMD Family 17h chips") commit 6befa3fde65f ("i2c: piix4: Support

[PATCH 4.9 74/83] mmc: sdhci-of-at91: add quirk for broken HS200

2019-09-04 Thread Greg Kroah-Hartman
From: Eugen Hristev commit 7871aa60ae0086fe4626abdf5ed13eeddf306c61 upstream. HS200 is not implemented in the driver, but the controller claims it through caps. Remove it via a quirk, to make sure the mmc core do not try to enable HS200, as it causes the eMMC initialization to fail.

[PATCH 4.9 36/83] x86/boot: Fix boot regression caused by bootparam sanitizing

2019-09-04 Thread Greg Kroah-Hartman
From: John Hubbard commit 7846f58fba964af7cb8cf77d4d13c33254725211 upstream. commit a90118c445cc ("x86/boot: Save fields explicitly, zero out everything else") had two errors: * It preserved boot_params.acpi_rsdp_addr, and * It failed to preserve boot_params.hdr Therefore, zero out

[PATCH 4.9 75/83] mmc: core: Fix init of SD cards reporting an invalid VDD range

2019-09-04 Thread Greg Kroah-Hartman
From: Ulf Hansson commit 72741084d903e65e121c27bd29494d941729d4a1 upstream. The OCR register defines the supported range of VDD voltages for SD cards. However, it has turned out that some SD cards reports an invalid voltage range, for example having bit7 set. When a host supports

[PATCH 4.9 79/83] mac80211: fix possible sta leak

2019-09-04 Thread Greg Kroah-Hartman
From: Johannes Berg commit 5fd2f91ad483baffdbe798f8a08f1b41442d1e24 upstream. If TDLS station addition is rejected, the sta memory is leaked. Avoid this by moving the check before the allocation. Cc: sta...@vger.kernel.org Fixes: 7ed5285396c2 ("mac80211: don't initiate TDLS connection if

[PATCH 4.9 83/83] x86/ptrace: fix up botched merge of spectrev1 fix

2019-09-04 Thread Greg Kroah-Hartman
From: Greg Kroah-Hartman I incorrectly merged commit 31a2fbb390fe ("x86/ptrace: Fix possible spectre-v1 in ptrace_get_debugreg()") when backporting it, as was graciously pointed out at https://grsecurity.net/teardown_of_a_failed_linux_lts_spectre_fix.php Resolve the upstream difference with the

[PATCH 4.9 28/83] HID: wacom: correct misreported EKR ring values

2019-09-04 Thread Greg Kroah-Hartman
From: Aaron Armstrong Skomra commit fcf887e7caaa813eea821d11bf2b7619a37df37a upstream. The EKR ring claims a range of 0 to 71 but actually reports values 1 to 72. The ring is used in relative mode so this change should not affect users. Signed-off-by: Aaron Armstrong Skomra Fixes:

[PATCH 4.9 80/83] KVM: arm/arm64: vgic: Fix potential deadlock when ap_list is long

2019-09-04 Thread Greg Kroah-Hartman
[ Upstream commit d4a8061a7c5f7c27a2dc002ee4cb89b3e6637e44 ] If the ap_list is longer than 256 entries, merge_final() in list_sort() will call the comparison callback with the same element twice, causing a deadlock in vgic_irq_cmp(). Fix it by returning early when irqa == irqb. Cc:

[PATCH 4.9 37/83] dm btree: fix order of block initialization in btree_split_beneath

2019-09-04 Thread Greg Kroah-Hartman
From: ZhangXiaoxu commit e4f9d6013820d1eba1432d51dd1c5795759aa77f upstream. When btree_split_beneath() splits a node to two new children, it will allocate two blocks: left and right. If right block's allocation failed, the left block will be unlocked and marked dirty. If this happened, the

[PATCH 4.9 77/83] VMCI: Release resource if the work is already queued

2019-09-04 Thread Greg Kroah-Hartman
From: Nadav Amit commit ba03a9bbd17b149c373c0ea44017f35fc2cd0f28 upstream. Francois reported that VMware balloon gets stuck after a balloon reset, when the VMCI doorbell is removed. A similar error can occur when the balloon driver is removed with the following splat: [ 1088.622000] INFO: task

[PATCH 4.9 34/83] x86/apic: Handle missing global clockevent gracefully

2019-09-04 Thread Greg Kroah-Hartman
From: Thomas Gleixner commit f897e60a12f0b9146357780d317879bce2a877dc upstream. Some newer machines do not advertise legacy timers. The kernel can handle that situation if the TSC and the CPU frequency are enumerated by CPUID or MSRs and the CPU supports TSC deadline timer. If the CPU does not

[PATCH 4.9 70/83] USB: storage: ums-realtek: Update module parameter description for auto_delink_en

2019-09-04 Thread Greg Kroah-Hartman
From: Kai-Heng Feng commit f6445b6b2f2bb1745080af4a0926049e8bca2617 upstream. The option named "auto_delink_en" is a bit misleading, as setting it to false doesn't really disable auto-delink but let auto-delink be firmware controlled. Update the description to reflect the real usage of this

[PATCH 4.9 32/83] userfaultfd_release: always remove uffd flags and clear vm_userfaultfd_ctx

2019-09-04 Thread Greg Kroah-Hartman
From: Oleg Nesterov commit 46d0b24c5ee10a15dfb25e20642f5a5ed59c5003 upstream. userfaultfd_release() should clear vm_flags/vm_userfaultfd_ctx even if mm->core_state != NULL. Otherwise a page fault can see userfaultfd_missing() == T and use an already freed userfaultfd_ctx. Link:

[PATCH 4.9 68/83] usb: host: ohci: fix a race condition between shutdown and irq

2019-09-04 Thread Greg Kroah-Hartman
From: Yoshihiro Shimoda commit a349b95d7ca0cea71be4a7dac29830703de7eb62 upstream. This patch fixes an issue that the following error is possible to happen when ohci hardware causes an interruption and the system is shutting down at the same time. [ 34.851754] usb 2-1: USB disconnect, device

[PATCH 4.9 71/83] USB: storage: ums-realtek: Whitelist auto-delink support

2019-09-04 Thread Greg Kroah-Hartman
From: Kai-Heng Feng commit 1902a01e2bcc3abd7c9a18dc05e78c7ab4a53c54 upstream. Auto-delink requires writing special registers to ums-realtek devices. Unconditionally enable auto-delink may break newer devices. So only enable auto-delink by default for the original three IDs, 0x0138, 0x0158 and

[PATCH 4.9 69/83] usb: host: xhci: rcar: Fix typo in compatible string matching

2019-09-04 Thread Greg Kroah-Hartman
From: Geert Uytterhoeven commit 636bd02a7ba9025ff851d0cfb92768c8fa865859 upstream. It's spelled "renesas", not "renensas". Due to this typo, RZ/G1M and RZ/G1N were not covered by the check. Fixes: 2dc240a3308b ("usb: host: xhci: rcar: retire use of xhci_plat_type_is()") Signed-off-by: Geert

Re: [PATCH 1/2] pci: Convert to use built-in RCU list checking

2019-09-04 Thread Joel Fernandes
On Wed, Sep 4, 2019 at 1:13 PM Andy Shevchenko wrote: > > On Wed, Sep 4, 2019 at 8:07 AM Joel Fernandes wrote: > > > > On Wed, Sep 04, 2019 at 12:06:43PM +0800, kbuild test robot wrote: > > > Hi "Joel, > > > > > > Thank you for the patch! Yet something to improve: > > > > > > [auto build test

[PATCH 4.9 62/83] x86/apic: Do not initialize LDR and DFR for bigsmp

2019-09-04 Thread Greg Kroah-Hartman
From: Bandan Das commit bae3a8d3308ee69a7dbdf145911b18dfda8ade0d upstream. Legacy apic init uses bigsmp for smp systems with 8 and more CPUs. The bigsmp APIC implementation uses physical destination mode, but it nevertheless initializes LDR and DFR. The LDR even ends up incorrectly with

[PATCH 4.9 64/83] mm/zsmalloc.c: fix race condition in zs_destroy_pool

2019-09-04 Thread Greg Kroah-Hartman
[ Upstream commit 701d678599d0c1623aaf4139c03eea260a75b027 ] In zs_destroy_pool() we call flush_work(>free_work). However, we have no guarantee that migration isn't happening in the background at that time. Since migration can't directly free pages, it relies on free_work being scheduled to

[PATCH 4.9 63/83] x86/apic: Include the LDR when clearing out APIC registers

2019-09-04 Thread Greg Kroah-Hartman
From: Bandan Das commit 558682b5291937a70748d36fd9ba757fb25b99ae upstream. Although APIC initialization will typically clear out the LDR before setting it, the APIC cleanup code should reset the LDR. This was discovered with a 32-bit KVM guest jumping into a kdump kernel. The stale bits in the

[PATCH 4.9 67/83] usb: chipidea: udc: dont do hardware access if gadget has stopped

2019-09-04 Thread Greg Kroah-Hartman
From: Peter Chen commit cbe85c88ce80fb92956a0793518d415864dcead8 upstream. After _gadget_stop_activity is executed, we can consider the hardware operation for gadget has finished, and the udc can be stopped and enter low power mode. So, any later hardware operations (from usb_ep_ops APIs or

[PATCH 4.9 58/83] tcp: make sure EPOLLOUT wont be missed

2019-09-04 Thread Greg Kroah-Hartman
From: Eric Dumazet [ Upstream commit ef8d8ccdc216f797e66cb4a1372f5c4c285ce1e4 ] As Jason Baron explained in commit 790ba4566c1a ("tcp: set SOCK_NOSPACE under memory pressure"), it is crucial we properly set SOCK_NOSPACE when needed. However, Jason patch had a bug, because the 'nonblocking'

[PATCH 4.9 31/83] gpiolib: never report open-drain/source lines as input to user-space

2019-09-04 Thread Greg Kroah-Hartman
From: Bartosz Golaszewski commit 2c60e6b5c9241b24b8b523fefd3e44fb85622cda upstream. If the driver doesn't support open-drain/source config options, we emulate this behavior when setting the direction by calling gpiod_direction_input() if the default value is 0 (open-source) or 1 (open-drain),

[PATCH 4.9 60/83] ALSA: seq: Fix potential concurrent access to the deleted pool

2019-09-04 Thread Greg Kroah-Hartman
From: Takashi Iwai commit 75545304eba6a3d282f923b96a466dc25a81e359 upstream. The input pool of a client might be deleted via the resize ioctl, the the access to it should be covered by the proper locks. Currently the only missing place is the call in snd_seq_ioctl_get_client_pool(), and this

[PATCH 4.9 56/83] ALSA: usb-audio: Fix a stack buffer overflow bug in check_input_term

2019-09-04 Thread Greg Kroah-Hartman
From: Hui Peng commit 19bce474c45be69a284ecee660aa12d8f1e88f18 upstream. `check_input_term` recursively calls itself with input from device side (e.g., uac_input_terminal_descriptor.bCSourceID) as argument (id). In `check_input_term`, if `check_input_term` is called with the same `id` argument

[PATCH 4.9 57/83] ALSA: usb-audio: Fix an OOB bug in parse_audio_mixer_unit

2019-09-04 Thread Greg Kroah-Hartman
From: Hui Peng commit daac07156b330b18eb5071aec4b3ddca1c377f2c upstream. The `uac_mixer_unit_descriptor` shown as below is read from the device side. In `parse_audio_mixer_unit`, `baSourceID` field is accessed from index 0 to `bNrInPins` - 1, the current implementation assumes that descriptor

[PATCH 4.9 30/83] Revert "dm bufio: fix deadlock with loop device"

2019-09-04 Thread Greg Kroah-Hartman
From: Mikulas Patocka commit cf3591ef832915892f2499b7e54b51d4c578b28c upstream. Revert the commit bd293d071ffe65e645b4d8104f9d8fe15ea13862. The proper fix has been made available with commit d0a255e795ab ("loop: set PF_MEMALLOC_NOIO for the worker thread"). Note that the fix offered by commit

[PATCH 4.9 49/83] xen/blkback: fix memory leaks

2019-09-04 Thread Greg Kroah-Hartman
[ Upstream commit ae78ca3cf3d9e9f914bfcd0bc5c389ff18b9c2e0 ] In read_per_ring_refs(), after 'req' and related memory regions are allocated, xen_blkif_map() is invoked to map the shared frame, irq, and etc. However, if this mapping process fails, no cleanup is performed, leading to memory leaks.

[PATCH 4.9 54/83] scsi: ufs: Fix RX_TERMINATION_FORCE_ENABLE define value

2019-09-04 Thread Greg Kroah-Hartman
[ Upstream commit ebcb8f8508c5edf428f52525cec74d28edea7bcb ] Fix RX_TERMINATION_FORCE_ENABLE define value from 0x0089 to 0x00A9 according to MIPI Alliance MPHY specification. Fixes: e785060ea3a1 ("ufs: definitions for phy interface") Signed-off-by: Pedro Sousa Signed-off-by: Martin K. Petersen

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