[PATCH 4.14 31/91] locking/lockdep: Fix overflow in presentation of average lock-time

2020-09-01 Thread Greg Kroah-Hartman
From: Chris Wilson [ Upstream commit a7ef9b28aa8d72a1656fa6f0a01bbd1493886317 ] Though the number of lock-acquisitions is tracked as unsigned long, this is passed as the divisor to div_s64() which interprets it as a s32, giving nonsense values with more than 2 billion acquisitons. E.g. acquis

[PATCH 4.14 32/91] scsi: iscsi: Do not put host in iscsi_set_flashnode_param()

2020-09-01 Thread Greg Kroah-Hartman
From: Jing Xiangfeng [ Upstream commit 68e12e5f61354eb42cfffbc20a693153fc39738e ] If scsi_host_lookup() fails we will jump to put_host which may cause a panic. Jump to exit_set_fnode instead. Link: https://lore.kernel.org/r/20200615081226.183068-1-jingxiangf...@huawei.com Reviewed-by: Mike Chri

[PATCH 4.14 79/91] USB: quirks: Add no-lpm quirk for another Raydium touchscreen

2020-09-01 Thread Greg Kroah-Hartman
From: Kai-Heng Feng commit 5967116e8358899ebaa22702d09b0af57fef23e1 upstream. There's another Raydium touchscreen needs the no-lpm quirk: [1.339149] usb 1-9: New USB device found, idVendor=2386, idProduct=350e, bcdDevice= 0.00 [1.339150] usb 1-9: New USB device strings: Mfr=1, Product=2

[PATCH 4.14 78/91] usb: uas: Add quirk for PNY Pro Elite

2020-09-01 Thread Greg Kroah-Hartman
From: Thinh Nguyen commit 9a469bc9f32dd33c7aac5744669d21a023a719cd upstream. PNY Pro Elite USB 3.1 Gen 2 device (SSD) doesn't respond to ATA_12 pass-through command (i.e. it just hangs). If it doesn't support this command, it should respond properly to the host. Let's just add a quirk to be able

[PATCH 4.14 86/91] USB: cdc-acm: rework notification_buffer resizing

2020-09-01 Thread Greg Kroah-Hartman
From: Tom Rix commit f4b9d8a582f738c24ebeabce5cc15f4b8159d74e upstream. Clang static analysis reports this error cdc-acm.c:409:3: warning: Use of memory after it is freed acm_process_notification(acm, (unsigned char *)dr); There are three problems, the first one is that dr is not reset

[PATCH 4.19 019/125] iommu/iova: Dont BUG on invalid PFNs

2020-09-01 Thread Greg Kroah-Hartman
From: Robin Murphy [ Upstream commit d3e3d2be688b4b5864538de61e750721a311e4fc ] Unlike the other instances which represent a complete loss of consistency within the rcache mechanism itself, or a fundamental and obvious misconfiguration by an IOMMU driver, the BUG_ON() in iova_magazine_free_pfns(

[PATCH 4.19 011/125] ASoC: img-parallel-out: Fix a reference count leak

2020-09-01 Thread Greg Kroah-Hartman
From: Qiushi Wu [ Upstream commit 6b9fbb073636906eee9fe4d4c05a4f445b9e2a23 ] pm_runtime_get_sync() increments the runtime PM usage counter even when it returns an error code, causing incorrect ref count if pm_runtime_put_noidle() is not called in error handling paths. Thus call pm_runtime_put_no

[PATCH 4.19 013/125] mfd: intel-lpss: Add Intel Emmitsburg PCH PCI IDs

2020-09-01 Thread Greg Kroah-Hartman
From: Andy Shevchenko [ Upstream commit 3ea2e4eab64cefa06055bb0541fcdedad4b48565 ] Intel Emmitsburg PCH has the same LPSS than Intel Ice Lake. Add the new IDs to the list of supported devices. Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones Signed-off-by: Sasha Levin --- drivers/mfd

[PATCH 4.14 70/91] writeback: Avoid skipping inode writeback

2020-09-01 Thread Greg Kroah-Hartman
From: Jan Kara commit 5afced3bf28100d81fb2fe7e98918632a08feaf5 upstream. Inode's i_io_list list head is used to attach inode to several different lists - wb->{b_dirty, b_dirty_time, b_io, b_more_io}. When flush worker prepares a list of inodes to writeback e.g. for sync(2), it moves inodes to b_

[PATCH 4.14 90/91] HID: hiddev: Fix slab-out-of-bounds write in hiddev_ioctl_usage()

2020-09-01 Thread Greg Kroah-Hartman
From: Peilin Ye commit 25a097f5204675550afb879ee18238ca917cba7a upstream. `uref->usage_index` is not always being properly checked, causing hiddev_ioctl_usage() to go out of bounds under some cases. Fix it. Reported-by: syzbot+34ee1b45d88571c2f...@syzkaller.appspotmail.com Link: https://syzkal

[PATCH 4.19 002/125] gre6: Fix reception with IP6_TNL_F_RCV_DSCP_COPY

2020-09-01 Thread Greg Kroah-Hartman
From: Mark Tomlinson [ Upstream commit 272502fcb7cda01ab07fc2fcff82d1d2f73d43cc ] When receiving an IPv4 packet inside an IPv6 GRE packet, and the IP6_TNL_F_RCV_DSCP_COPY flag is set on the tunnel, the IPv4 header would get corrupted. This is due to the common ip6_tnl_rcv() function assuming tha

[PATCH 4.19 015/125] powerpc/xive: Ignore kmemleak false positives

2020-09-01 Thread Greg Kroah-Hartman
From: Alexey Kardashevskiy [ Upstream commit f0993c839e95dd6c7f054a1015e693c87e33e4fb ] xive_native_provision_pages() allocates memory and passes the pointer to OPAL so kmemleak cannot find the pointer usage in the kernel memory and produces a false positive report (below) (even if the kernel di

[PATCH 4.19 017/125] blktrace: ensure our debugfs dir exists

2020-09-01 Thread Greg Kroah-Hartman
From: Luis Chamberlain [ Upstream commit b431ef837e3374da0db8ff6683170359aaa0859c ] We make an assumption that a debugfs directory exists, but since this can fail ensure it exists before allowing blktrace setup to complete. Otherwise we end up stuffing blktrace files on the debugfs root director

[PATCH 4.19 018/125] scsi: target: tcmu: Fix crash on ARM during cmd completion

2020-09-01 Thread Greg Kroah-Hartman
From: Bodo Stroesser [ Upstream commit 5a0c256d96f020e4771f6fd5524b80f89a2d3132 ] If tcmu_handle_completions() has to process a padding shorter than sizeof(struct tcmu_cmd_entry), the current call to tcmu_flush_dcache_range() with sizeof(struct tcmu_cmd_entry) as length param is wrong and causes

[PATCH 4.19 026/125] scsi: lpfc: Fix shost refcount mismatch when deleting vport

2020-09-01 Thread Greg Kroah-Hartman
From: Dick Kennedy [ Upstream commit 03dbfe0668e6692917ac278883e0586cd7f7d753 ] When vports are deleted, it is observed that there is memory/kthread leakage as the vport isn't fully being released. There is a shost reference taken in scsi_add_host_dma that is not released during scsi_remove_hos

[PATCH 4.19 023/125] drm/amd/display: fix ref count leak in amdgpu_drm_ioctl

2020-09-01 Thread Greg Kroah-Hartman
From: Navid Emamdoost [ Upstream commit 5509ac65f2fe5aa3c0003237ec629ca55024307c ] in amdgpu_drm_ioctl the call to pm_runtime_get_sync increments the counter even in case of failure, leading to incorrect ref count. In case of failure, decrement the ref count before returning. Signed-off-by: Nav

[PATCH 4.19 006/125] tipc: fix uninit skb->data in tipc_nl_compat_dumpit()

2020-09-01 Thread Greg Kroah-Hartman
From: Cong Wang [ Upstream commit 47733f9daf4fe4f7e0eb9e273f21ad3a19130487 ] __tipc_nl_compat_dumpit() has two callers, and it expects them to pass a valid nlmsghdr via arg->data. This header is artificial and crafted just for __tipc_nl_compat_dumpit(). tipc_nl_compat_publ_dump() does so by put

[PATCH 4.19 005/125] net/smc: Prevent kernel-infoleak in __smc_diag_dump()

2020-09-01 Thread Greg Kroah-Hartman
From: Peilin Ye [ Upstream commit ce51f63e63c52a4e1eee4dd040fb0ba0af3b43ab ] __smc_diag_dump() is potentially copying uninitialized kernel stack memory into socket buffers, since the compiler may leave a 4-byte hole near the beginning of `struct smcd_diag_dmbinfo`. Fix it by initializing `dinfo`

[PATCH 4.19 027/125] xfs: Dont allow logging of XFS_ISTALE inodes

2020-09-01 Thread Greg Kroah-Hartman
From: Dave Chinner [ Upstream commit 96355d5a1f0ee6dcc182c37db4894ec0c29f1692 ] In tracking down a problem in this patchset, I discovered we are reclaiming dirty stale inodes. This wasn't discovered until inodes were always attached to the cluster buffer and then the rcu callback that freed inod

[PATCH 4.19 009/125] ALSA: pci: delete repeated words in comments

2020-09-01 Thread Greg Kroah-Hartman
From: Randy Dunlap [ Upstream commit c7fabbc51352f50cc58242a6dc3b9c1a3599849b ] Drop duplicated words in sound/pci/. {and, the, at} Signed-off-by: Randy Dunlap Link: https://lore.kernel.org/r/20200806021926.32418-1-rdun...@infradead.org Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin

[PATCH 4.19 008/125] ipvlan: fix device features

2020-09-01 Thread Greg Kroah-Hartman
From: Mahesh Bandewar [ Upstream commit d0f5c7076e01fef6fcb86988d9508bf3ce258bd4 ] Processing NETDEV_FEAT_CHANGE causes IPvlan links to lose NETIF_F_LLTX feature because of the incorrect handling of features in ipvlan_fix_features(). --before-- lpaa10:~# ethtool -k ipvl0 | grep tx-lockless tx-l

[PATCH 4.19 004/125] net: qrtr: fix usage of idr in port assignment to socket

2020-09-01 Thread Greg Kroah-Hartman
From: Necip Fazil Yildiran [ Upstream commit 8dfddfb79653df7c38a9c8c4c034f242a36acee9 ] Passing large uint32 sockaddr_qrtr.port numbers for port allocation triggers a warning within idr_alloc() since the port number is cast to int, and thus interpreted as a negative number. This leads to the rej

[PATCH 4.19 042/125] btrfs: file: reserve qgroup space after the hole punch range is locked

2020-09-01 Thread Greg Kroah-Hartman
From: Qu Wenruo [ Upstream commit a7f8b1c2ac21bf081b41264c9cfd6260dffa6246 ] The incoming qgroup reserved space timing will move the data reservation to ordered extent completely. However in btrfs_punch_hole_lock_range() will call btrfs_invalidate_page(), which will clear QGROUP_RESERVED bit fo

[PATCH 4.19 041/125] locking/lockdep: Fix overflow in presentation of average lock-time

2020-09-01 Thread Greg Kroah-Hartman
From: Chris Wilson [ Upstream commit a7ef9b28aa8d72a1656fa6f0a01bbd1493886317 ] Though the number of lock-acquisitions is tracked as unsigned long, this is passed as the divisor to div_s64() which interprets it as a s32, giving nonsense values with more than 2 billion acquisitons. E.g. acquis

[PATCH 4.19 044/125] ceph: fix potential mdsc use-after-free crash

2020-09-01 Thread Greg Kroah-Hartman
From: Xiubo Li [ Upstream commit fa9967734227b44acb1b6918033f9122dc7825b9 ] Make sure the delayed work stopped before releasing the resources. cancel_delayed_work_sync() will only guarantee that the work finishes executing if the work is already in the ->worklist. That means after the cancel_d

[PATCH 4.19 049/125] powerpc/spufs: add CONFIG_COREDUMP dependency

2020-09-01 Thread Greg Kroah-Hartman
From: Arnd Bergmann [ Upstream commit b648a5132ca3237a0f1ce5d871fff342b0efcf8a ] The kernel test robot pointed out a slightly different error message after recent commit 5456ffdee666 ("powerpc/spufs: simplify spufs core dumping") to spufs for a configuration that never worked: powerpc64-linu

[PATCH 4.19 051/125] efi: provide empty efi_enter_virtual_mode implementation

2020-09-01 Thread Greg Kroah-Hartman
From: Andrey Konovalov [ Upstream commit 2c547f9da0539ad1f7ef7f08c8c82036d61b011a ] When CONFIG_EFI is not enabled, we might get an undefined reference to efi_enter_virtual_mode() error, if this efi_enabled() call isn't inlined into start_kernel(). This happens in particular, if start_kernel()

[PATCH 4.19 047/125] media: davinci: vpif_capture: fix potential double free

2020-09-01 Thread Greg Kroah-Hartman
From: Evgeny Novikov [ Upstream commit 602649eadaa0c977e362e641f51ec306bc1d365d ] In case of errors vpif_probe_complete() releases memory for vpif_obj.sd and unregisters the V4L2 device. But then this is done again by vpif_probe() itself. The patch removes the cleaning from vpif_probe_complete()

[PATCH 4.19 043/125] scsi: iscsi: Do not put host in iscsi_set_flashnode_param()

2020-09-01 Thread Greg Kroah-Hartman
From: Jing Xiangfeng [ Upstream commit 68e12e5f61354eb42cfffbc20a693153fc39738e ] If scsi_host_lookup() fails we will jump to put_host which may cause a panic. Jump to exit_set_fnode instead. Link: https://lore.kernel.org/r/20200615081226.183068-1-jingxiangf...@huawei.com Reviewed-by: Mike Chri

[PATCH 4.19 052/125] Revert "ath10k: fix DMA related firmware crashes on multiple devices"

2020-09-01 Thread Greg Kroah-Hartman
From: Zhi Chen [ Upstream commit a1769bb68a850508a492e3674ab1e5e479b11254 ] This reverts commit 76d164f582150fd0259ec0fcbc485470bcd8033e. PCIe hung issue was observed on multiple platforms. The issue was reproduced when DUT was configured as AP and associated with 50+ STAs. For QCA9984/QCA9888,

[PATCH 4.19 054/125] drm/msm/adreno: fix updating ring fence

2020-09-01 Thread Greg Kroah-Hartman
From: Rob Clark [ Upstream commit f228af11dfa1d1616bc67f3a4119ab77c36181f1 ] We need to set it to the most recent completed fence, not the most recent submitted. Otherwise we have races where we think we can retire submits that the GPU is not finished with, if the GPU doesn't manage to overwrit

[PATCH 4.19 060/125] ext4: dont BUG on inconsistent journal feature

2020-09-01 Thread Greg Kroah-Hartman
From: Jan Kara [ Upstream commit 11215630aada28307ba555a43138db6ac54fa825 ] A customer has reported a BUG_ON in ext4_clear_journal_err() hitting during an LTP testing. Either this has been caused by a test setup issue where the filesystem was being overwritten while LTP was mounting it or the jo

[PATCH 4.19 057/125] i2c: rcar: in slave mode, clear NACK earlier

2020-09-01 Thread Greg Kroah-Hartman
From: Wolfram Sang [ Upstream commit 914a7b3563b8fb92f976619bbd0fa3a4a708baae ] Currently, a NACK in slave mode is set/cleared when SCL is held low by the IP core right before the bit is about to be pushed out. This is too late for clearing and then a NACK from the previous byte is still used fo

[PATCH 4.19 058/125] usb: gadget: f_tcm: Fix some resource leaks in some error paths

2020-09-01 Thread Greg Kroah-Hartman
From: Christophe JAILLET [ Upstream commit 07c8434150f4eb0b65cae288721c8af1080fde17 ] If a memory allocation fails within a 'usb_ep_alloc_request()' call, the already allocated memory must be released. Fix a mix-up in the code and free the correct requests. Fixes: c52661d60f63 ("usb-gadget: In

[PATCH 4.19 085/125] fbcon: prevent user font height or width change from causing potential out-of-bounds access

2020-09-01 Thread Greg Kroah-Hartman
From: George Kennedy commit 39b3cffb8cf3111738ea993e2757ab382253d86a upstream. Add a check to fbcon_resize() to ensure that a possible change to user font height or user font width will not allow a font data out-of-bounds access. NOTE: must use original charcount in calculation as font charcount

[PATCH 4.19 066/125] fs: prevent BUG_ON in submit_bh_wbc()

2020-09-01 Thread Greg Kroah-Hartman
From: Xianting Tian [ Upstream commit 377254b2cd2252c7c3151b113cbdf93a7736c2e9 ] If a device is hot-removed --- for example, when a physical device is unplugged from pcie slot or a nbd device's network is shutdown --- this can result in a BUG_ON() crash in submit_bh_wbc(). This is because the w

[PATCH 4.19 117/125] USB: cdc-acm: rework notification_buffer resizing

2020-09-01 Thread Greg Kroah-Hartman
From: Tom Rix commit f4b9d8a582f738c24ebeabce5cc15f4b8159d74e upstream. Clang static analysis reports this error cdc-acm.c:409:3: warning: Use of memory after it is freed acm_process_notification(acm, (unsigned char *)dr); There are three problems, the first one is that dr is not reset

[PATCH 4.19 120/125] usb: dwc3: gadget: Dont setup more than requested

2020-09-01 Thread Greg Kroah-Hartman
From: Thinh Nguyen [ Upstream commit 5d187c0454ef4c5e046a81af36882d4d515922ec ] The SG list may be set up with entry size more than the requested length. Check the usb_request->length and make sure that we don't setup the TRBs to send/receive more than requested. This case may occur when the SG

[PATCH 4.19 103/125] genirq/matrix: Deal with the sillyness of for_each_cpu() on UP

2020-09-01 Thread Greg Kroah-Hartman
From: Thomas Gleixner commit 784a0830377d0761834e385975bc46861fea9fa0 upstream. Most of the CPU mask operations behave the same way, but for_each_cpu() and it's variants ignore the cpumask argument and claim that CPU0 is always in the mask. This is historical, inconsistent and annoying behaviour

[PATCH 4.19 097/125] XEN uses irqdesc::irq_data_common::handler_data to store a per interrupt XEN data pointer which contains XEN specific information.

2020-09-01 Thread Greg Kroah-Hartman
From: Thomas Gleixner commit c330fb1ddc0a922f044989492b7fcca77ee1db46 upstream. handler data is meant for interrupt handlers and not for storing irq chip specific information as some devices require handler data to store internal per interrupt information, e.g. pinctrl/GPIO chained interrupt han

[PATCH 4.19 095/125] writeback: Avoid skipping inode writeback

2020-09-01 Thread Greg Kroah-Hartman
From: Jan Kara commit 5afced3bf28100d81fb2fe7e98918632a08feaf5 upstream. Inode's i_io_list list head is used to attach inode to several different lists - wb->{b_dirty, b_dirty_time, b_io, b_more_io}. When flush worker prepares a list of inodes to writeback e.g. for sync(2), it moves inodes to b_

[PATCH 4.19 123/125] tpm: Unify the mismatching TPM space buffer sizes

2020-09-01 Thread Greg Kroah-Hartman
From: Jarkko Sakkinen [ Upstream commit 6c4e79d99e6f42b79040f1a33cd4018f5425030b ] The size of the buffers for storing context's and sessions can vary from arch to arch as PAGE_SIZE can be anything between 4 kB and 256 kB (the maximum for PPC64). Define a fixed buffer size set to 16 kB. This sho

[PATCH 5/6] mtd: rawnand: marvell: Fix and update kerneldoc

2020-09-01 Thread Krzysztof Kozlowski
Fix kerneldoc comments and add missing documentation for members to fix W=1 compile warnings like: drivers/mtd/nand/raw/marvell_nand.c:251: warning: cannot understand function prototype: 'struct marvell_hw_ecc_layout ' drivers/mtd/nand/raw/marvell_nand.c:342: warning: Function paramet

[PATCH 4.19 094/125] writeback: Protect inode->i_io_list with inode->i_lock

2020-09-01 Thread Greg Kroah-Hartman
From: Jan Kara commit b35250c0816c7cf7d0a8de92f5fafb6a7508a708 upstream. Currently, operations on inode->i_io_list are protected by wb->list_lock. In the following patches we'll need to maintain consistency between inode->i_state and inode->i_io_list so change the code so that inode->i_lock prot

[PATCH 4.19 102/125] device property: Fix the secondary firmware node handling in set_primary_fwnode()

2020-09-01 Thread Greg Kroah-Hartman
From: Heikki Krogerus commit c15e1bdda4365a5f17cdadf22bf1c1df13884a9e upstream. When the primary firmware node pointer is removed from a device (set to NULL) the secondary firmware node pointer, when it exists, is made the primary node for the device. However, the secondary firmware node pointer

[PATCH 5.4 012/214] ipvlan: fix device features

2020-09-01 Thread Greg Kroah-Hartman
From: Mahesh Bandewar [ Upstream commit d0f5c7076e01fef6fcb86988d9508bf3ce258bd4 ] Processing NETDEV_FEAT_CHANGE causes IPvlan links to lose NETIF_F_LLTX feature because of the incorrect handling of features in ipvlan_fix_features(). --before-- lpaa10:~# ethtool -k ipvl0 | grep tx-lockless tx-l

[PATCH 5.4 018/214] ASoC: img-parallel-out: Fix a reference count leak

2020-09-01 Thread Greg Kroah-Hartman
From: Qiushi Wu [ Upstream commit 6b9fbb073636906eee9fe4d4c05a4f445b9e2a23 ] pm_runtime_get_sync() increments the runtime PM usage counter even when it returns an error code, causing incorrect ref count if pm_runtime_put_noidle() is not called in error handling paths. Thus call pm_runtime_put_no

[PATCH 05/11] spi: cadence-quadspi: Simplify with dev_err_probe()

2020-09-01 Thread Krzysztof Kozlowski
Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski --- drivers/spi/spi-cadence-quadspi.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/spi/spi-cadence-

[PATCH 5.4 042/214] rtlwifi: rtl8192cu: Prevent leaking urb

2020-09-01 Thread Greg Kroah-Hartman
From: Reto Schneider [ Upstream commit 03128643eb5453a798db5770952c73dc64fcaf00 ] If usb_submit_urb fails the allocated urb should be unanchored and released. Signed-off-by: Reto Schneider Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200622132113.14508-3-c...@reto-schneider.ch

[PATCH 08/11] spi: stm32: Simplify with dev_err_probe()

2020-09-01 Thread Krzysztof Kozlowski
Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski --- drivers/spi/spi-stm32.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/spi/spi-stm32.c b/drivers/s

[PATCH 02/11] spi: sprd: Simplify with dev_err_probe()

2020-09-01 Thread Krzysztof Kozlowski
Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski --- drivers/spi/spi-sprd-adi.c | 5 + drivers/spi/spi-sprd.c | 17 + 2 files changed, 6 insertions(+), 16 del

[PATCH 5.4 047/214] f2fs: fix use-after-free issue

2020-09-01 Thread Greg Kroah-Hartman
From: Li Guifu [ Upstream commit 99c787cfd2bd04926f1f553b30bd7dcea2caaba1 ] During umount, f2fs_put_super() unregisters procfs entries after f2fs_destroy_segment_manager(), it may cause use-after-free issue when umount races with procfs accessing, fix it by relocating f2fs_unregister_sysfs(). [

[PATCH 5.4 049/214] drm/nouveau: fix reference count leak in nv50_disp_atomic_commit

2020-09-01 Thread Greg Kroah-Hartman
From: Aditya Pakki [ Upstream commit a2cdf39536b0d21fb06113f5e16692513d7bcb9c ] nv50_disp_atomic_commit() calls calls pm_runtime_get_sync and in turn increments the reference count. In case of failure, decrement the ref count before returning the error. Signed-off-by: Aditya Pakki Signed-off-b

[PATCH 5.4 002/214] binfmt_flat: revert "binfmt_flat: dont offset the data start"

2020-09-01 Thread Greg Kroah-Hartman
From: Max Filippov commit 2217b982624680d19a80ebb4600d05c8586c4f96 upstream. binfmt_flat loader uses the gap between text and data to store data segment pointers for the libraries. Even in the absence of shared libraries it stores at least one pointer to the executable's own data segment. Text a

[PATCH 5.4 043/214] mips/vdso: Fix resource leaks in genvdso.c

2020-09-01 Thread Greg Kroah-Hartman
From: Peng Fan [ Upstream commit a859647b4e6bfeb192284d27d24b6a0c914cae1d ] Close "fd" before the return of map_vdso() and close "out_file" in main(). Signed-off-by: Peng Fan Signed-off-by: Thomas Bogendoerfer Signed-off-by: Sasha Levin --- arch/mips/vdso/genvdso.c | 10 ++ 1 file c

[PATCH 5.4 007/214] net: sctp: Fix negotiation of the number of data streams.

2020-09-01 Thread Greg Kroah-Hartman
From: David Laight [ Upstream commit ab921f3cdbec01c68705a7ade8bec628d541fc2b ] The number of output and input streams was never being reduced, eg when processing received INIT or INIT_ACK chunks. The effect is that DATA chunks can be sent with invalid stream ids and then discarded by the remote

[PATCH 5.4 146/214] powerpc/perf: Fix soft lockups due to missed interrupt accounting

2020-09-01 Thread Greg Kroah-Hartman
From: Athira Rajeev [ Upstream commit 17899eaf88d689529b866371344c8f269ba79b5f ] Performance monitor interrupt handler checks if any counter has overflown and calls record_and_restart() in core-book3s which invokes perf_event_overflow() to record the sample information. Apart from creating sampl

[PATCH 5.4 152/214] blk-mq: order adding requests to hctx->dispatch and checking SCHED_RESTART

2020-09-01 Thread Greg Kroah-Hartman
From: Ming Lei commit d7d8535f377e9ba87edbf7fbbd634ac942f3f54f upstream. SCHED_RESTART code path is relied to re-run queue for dispatch requests in hctx->dispatch. Meantime the SCHED_RSTART flag is checked when adding requests to hctx->dispatch. memory barriers have to be used for ordering the

[PATCH 5.4 122/214] spi: stm32h7: fix race condition at end of transfer

2020-09-01 Thread Greg Kroah-Hartman
From: Antonio Borneo [ Upstream commit 135dd873d3c76d812ae64c668adef3f2c59ed27f ] The caller of stm32_spi_transfer_one(), spi_transfer_one_message(), is waiting for us to call spi_finalize_current_transfer() and will eventually schedule a new transfer, if available. We should guarantee that the

[PATCH 5.4 156/214] btrfs: detect nocow for swap after snapshot delete

2020-09-01 Thread Greg Kroah-Hartman
From: Boris Burkov commit a84d5d429f9eb56f81b388609841ed993f0ddfca upstream. can_nocow_extent and btrfs_cross_ref_exist both rely on a heuristic for detecting a must cow condition which is not exactly accurate, but saves unnecessary tree traversal. The incorrect assumption is that if the extent

[PATCH 5.4 128/214] drm/amd/display: Switch to immediate mode for updating infopackets

2020-09-01 Thread Greg Kroah-Hartman
From: Anthony Koo [ Upstream commit abba907c7a20032c2d504fd5afe3af7d440a09d0 ] [Why] Using FRAME_UPDATE will result in infopacket to be potentially updated one frame late. In commit stream scenarios for previously active stream, some stale infopacket data from previous config might be erroneousl

[PATCH 5.4 159/214] vt: defer kfree() of vc_screenbuf in vc_do_resize()

2020-09-01 Thread Greg Kroah-Hartman
From: Tetsuo Handa commit f8d1653daec02315e06d30246cff4af72e76e54e upstream. syzbot is reporting UAF bug in set_origin() from vc_do_resize() [1], for vc_do_resize() calls kfree(vc->vc_screenbuf) before calling set_origin(). Unfortunately, in set_origin(), vc->vc_sw->con_set_origin() might acces

[PATCH 5.4 150/214] block: loop: set discard granularity and alignment for block device backed loop

2020-09-01 Thread Greg Kroah-Hartman
From: Ming Lei commit bcb21c8cc9947286211327d663ace69f07d37a76 upstream. In case of block device backend, if the backend supports write zeros, the loop device will set queue flag of QUEUE_FLAG_DISCARD. However, limits.discard_granularity isn't setup, and this way is wrong, see the following desc

[PATCH 5.4 127/214] drm/amd/powerplay: correct UVD/VCE PG state on custom pptable uploading

2020-09-01 Thread Greg Kroah-Hartman
From: Evan Quan [ Upstream commit 2c5b8080d810d98e3e59617680218499b17c84a1 ] The UVD/VCE PG state is managed by UVD and VCE IP. It's error-prone to assume the bootup state in SMU based on the dpm status. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher Signed-off-b

[PATCH 5.4 125/214] spi: stm32: always perform registers configuration prior to transfer

2020-09-01 Thread Greg Kroah-Hartman
From: Alain Volmat [ Upstream commit 60ccb3515fc61a0124c70aa37317f75b67560024 ] SPI registers content may have been lost upon suspend/resume sequence. So, always compute and apply the necessary configuration in stm32_spi_transfer_one_setup routine. Signed-off-by: Alain Volmat Link: https://lo

[PATCH 5.4 147/214] arm64: Move handling of erratum 1418040 into C code

2020-09-01 Thread Greg Kroah-Hartman
From: Marc Zyngier [ Upstream commit d49f7d7376d0c0daf8680984a37bd07581ac7d38 ] Instead of dealing with erratum 1418040 on each entry and exit, let's move the handling to __switch_to() instead, which has several advantages: - It can be applied when it matters (switching between 32 and 64 bit

[PATCH 5.4 157/214] fbcon: prevent user font height or width change from causing potential out-of-bounds access

2020-09-01 Thread Greg Kroah-Hartman
From: George Kennedy commit 39b3cffb8cf3111738ea993e2757ab382253d86a upstream. Add a check to fbcon_resize() to ensure that a possible change to user font height or user font width will not allow a font data out-of-bounds access. NOTE: must use original charcount in calculation as font charcount

[PATCH 5.4 172/214] xhci: Do warm-reset when both CAS and XDEV_RESUME are set

2020-09-01 Thread Greg Kroah-Hartman
From: Kai-Heng Feng commit 904df64a5f4d5ebd670801d869ca0a6d6a6e8df6 upstream. Sometimes re-plugging a USB device during system sleep renders the device useless: [ 173.418345] xhci_hcd :00:14.0: Get port status 2-4 read: 0x14203e2, return 0x10262 ... [ 176.496485] usb 2-4: Waited 2000ms fo

[PATCH 5.4 143/214] Revert "scsi: qla2xxx: Fix crash on qla2x00_mailbox_command"

2020-09-01 Thread Greg Kroah-Hartman
From: Saurav Kashyap [ Upstream commit de7e6194301ad31c4ce95395eb678e51a1b907e5 ] FCoE adapter initialization failed for ISP8021 with the following patch applied. In addition, reproduction of the issue the patch originally tried to address has been unsuccessful. This reverts commit 3cb182b3fa8b

[PATCH 5.4 178/214] crypto: af_alg - Work around empty control messages without MSG_MORE

2020-09-01 Thread Greg Kroah-Hartman
From: Herbert Xu commit c195d66a8a75c60515819b101975f38b7ec6577f upstream. The iwd daemon uses libell which sets up the skcipher operation with two separate control messages. As the first control message is sent without MSG_MORE, it is interpreted as an empty request. While libell should be fi

[PATCH 5.4 184/214] drm/amd/powerplay: Fix hardmins not being sent to SMU for RV

2020-09-01 Thread Greg Kroah-Hartman
From: Nicholas Kazlauskas commit e2bf3723db563457c0abe4eaeedac25d1d76 upstream. [Why] DC uses these to raise the voltage as needed for higher dispclk/dppclk and to ensure that we have enough bandwidth to drive the displays. There's a bug preventing these from actuially sending messages sinc

[PATCH 5.4 180/214] irqchip/stm32-exti: Avoid losing interrupts due to clearing pending bits by mistake

2020-09-01 Thread Greg Kroah-Hartman
From: qiuguorui1 commit e579076ac0a3bebb440fab101aef3c42c9f4c709 upstream. In the current code, when the eoi callback of the exti clears the pending bit of the current interrupt, it will first read the values of fpr and rpr, then logically OR the corresponding bit of the interrupt number, and fi

[PATCH 5.4 186/214] drm/amd/pm: correct Vega12 swctf limit setting

2020-09-01 Thread Greg Kroah-Hartman
From: Evan Quan commit e0ffd340249699ad27a6c91abdfa3e89f7823941 upstream. Correct the Vega12 thermal swctf limit. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: sta...@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/powerplay/h

[PATCH 5.4 202/214] usb: dwc3: gadget: Fix handling ZLP

2020-09-01 Thread Greg Kroah-Hartman
From: Thinh Nguyen [ Upstream commit d2ee3ff79e6a3d4105e684021017d100524dc560 ] The usb_request->zero doesn't apply for isoc. Also, if we prepare a 0-length (ZLP) TRB for the OUT direction, we need to prepare an extra TRB to pad up to the MPS alignment. Use the same bounce buffer for the ZLP TRB

[PATCH 5.4 201/214] usb: dwc3: gadget: Dont setup more than requested

2020-09-01 Thread Greg Kroah-Hartman
From: Thinh Nguyen [ Upstream commit 5d187c0454ef4c5e046a81af36882d4d515922ec ] The SG list may be set up with entry size more than the requested length. Check the usb_request->length and make sure that we don't setup the TRBs to send/receive more than requested. This case may occur when the SG

[PATCH 5.4 164/214] serial: stm32: avoid kernel warning on absence of optional IRQ

2020-09-01 Thread Greg Kroah-Hartman
From: Holger Assmann commit fdf16d78941b4f380753053d229955baddd00712 upstream. stm32_init_port() of the stm32-usart may trigger a warning in platform_get_irq() when the device tree specifies no wakeup interrupt. The wakeup interrupt is usually a board-specific GPIO and the driver functions corr

[PATCH 5.4 203/214] usb: dwc3: gadget: Handle ZLP for sg requests

2020-09-01 Thread Greg Kroah-Hartman
From: Thinh Nguyen [ Upstream commit bc9a2e226ea95e1699f7590845554de095308b75 ] Currently dwc3 doesn't handle usb_request->zero for SG requests. This change checks and prepares extra TRBs for the ZLP for SG requests. Cc: # v4.5+ Fixes: 04c03d10e507 ("usb: dwc3: gadget: handle request->zero") S

[PATCH 5.4 167/214] writeback: Protect inode->i_io_list with inode->i_lock

2020-09-01 Thread Greg Kroah-Hartman
From: Jan Kara commit b35250c0816c7cf7d0a8de92f5fafb6a7508a708 upstream. Currently, operations on inode->i_io_list are protected by wb->list_lock. In the following patches we'll need to maintain consistency between inode->i_state and inode->i_io_list so change the code so that inode->i_lock prot

[PATCH 5.4 192/214] USB: quirks: Ignore duplicate endpoint on Sound Devices MixPre-D

2020-09-01 Thread Greg Kroah-Hartman
From: Alan Stern commit 068834a2773b6a12805105cfadbb3d4229fc6e0a upstream. The Sound Devices MixPre-D audio card suffers from the same defect as the Sound Devices USBPre2: an endpoint shared between a normal audio interface and a vendor-specific interface, in violation of the USB spec. Since th

[PATCH 5.4 207/214] kheaders: optimize header copy for in-tree builds

2020-09-01 Thread Greg Kroah-Hartman
From: Masahiro Yamada commit ea79e5168be644fdaf7d4e6a73eceaf07b3da76a upstream. This script copies headers by the cpio command twice; first from srctree, and then from objtree. However, when we building in-tree, we know the srctree and the objtree are the same. That is, all the headers copied by

[PATCH 5.4 166/214] serial: 8250: change lock order in serial8250_do_startup()

2020-09-01 Thread Greg Kroah-Hartman
From: Sergey Senozhatsky commit 205d300aea75623e1ae4aa43e0d265ab9cf195fd upstream. We have a number of "uart.port->desc.lock vs desc.lock->uart.port" lockdep reports coming from 8250 driver; this causes a bit of trouble to people, so let's fix it. The problem is reverse lock order in two differ

[PATCH 5.4 163/214] serial: pl011: Dont leak amba_ports entry on driver register error

2020-09-01 Thread Greg Kroah-Hartman
From: Lukas Wunner commit 89efbe70b27dd325d8a8c177743a26b885f7faec upstream. pl011_probe() calls pl011_setup_port() to reserve an amba_ports[] entry, then calls pl011_register_port() to register the uart driver with the tty layer. If registration of the uart driver fails, the amba_ports[] entry

[PATCH 5.4 190/214] usb: uas: Add quirk for PNY Pro Elite

2020-09-01 Thread Greg Kroah-Hartman
From: Thinh Nguyen commit 9a469bc9f32dd33c7aac5744669d21a023a719cd upstream. PNY Pro Elite USB 3.1 Gen 2 device (SSD) doesn't respond to ATA_12 pass-through command (i.e. it just hangs). If it doesn't support this command, it should respond properly to the host. Let's just add a quirk to be able

[PATCH 5.4 209/214] kheaders: explain why include/config/autoconf.h is excluded from md5sum

2020-09-01 Thread Greg Kroah-Hartman
From: Masahiro Yamada commit f276031b4e2f4c961ed6d8a42f0f0124ccac2e09 upstream. This comment block explains why include/generated/compile.h is omitted, but nothing about include/generated/autoconf.h, which might be more difficult to understand. Add more comments. Signed-off-by: Masahiro Yamada

[PATCH 5.4 193/214] USB: Ignore UAS for JMicron JMS567 ATA/ATAPI Bridge

2020-09-01 Thread Greg Kroah-Hartman
From: Cyril Roelandt commit 9aa37788e7ebb3f489fb4b71ce07adadd444264a upstream. This device does not support UAS properly and a similar entry already exists in drivers/usb/storage/unusual_uas.h. Without this patch, storage_probe() defers the handling of this device to UAS, which cannot handle it

[PATCH 5.4 213/214] libbpf: Fix build on ppc64le architecture

2020-09-01 Thread Greg Kroah-Hartman
From: Andrii Nakryiko commit 3fb1a96a91120877488071a167d26d76be4be977 upstream. On ppc64le we get the following warning: In file included from btf_dump.c:16:0: btf_dump.c: In function ‘btf_dump_emit_struct_def’: ../include/linux/kernel.h:20:17: error: comparison of distinct pointer types

[PATCH 5.4 194/214] usb: host: ohci-exynos: Fix error handling in exynos_ohci_probe()

2020-09-01 Thread Greg Kroah-Hartman
From: Tang Bin commit 1d4169834628d18b2392a2da92b7fbf5e8e2ce89 upstream. If the function platform_get_irq() failed, the negative value returned will not be detected here. So fix error handling in exynos_ohci_probe(). And when get irq failed, the function platform_get_irq() logs an error message,

[PATCH 5.4 195/214] USB: gadget: u_f: add overflow checks to VLA macros

2020-09-01 Thread Greg Kroah-Hartman
From: Brooke Basile commit b1cd1b65afba95971fa457dfdb2c941c60d38c5b upstream. size can potentially hold an overflowed value if its assigned expression is left unchecked, leading to a smaller than needed allocation when vla_group_size() is used by callers to allocate memory. To fix this, add a te

[PATCH 5.4 197/214] USB: gadget: u_f: Unbreak offset calculation in VLAs

2020-09-01 Thread Greg Kroah-Hartman
From: Andy Shevchenko commit bfd08d06d978d0304eb6f7855b548aa2cd1c5486 upstream. Inadvertently the commit b1cd1b65afba ("USB: gadget: u_f: add overflow checks to VLA macros") makes VLA macros to always return 0 due to different scope of two variables of the same name. Obviously we need to have on

[PATCH 5.4 200/214] drm/i915: Fix cmd parser desc matching with masks

2020-09-01 Thread Greg Kroah-Hartman
From: Mika Kuoppala [ Upstream commit e5f10d6385cda083037915c12b130887c8831d2b ] Our variety of defined gpu commands have the actual command id field and possibly length and flags applied. We did start to apply the mask during initialization of the cmd descriptors but forgot to also apply it on

[PATCH 5.4 191/214] USB: quirks: Add no-lpm quirk for another Raydium touchscreen

2020-09-01 Thread Greg Kroah-Hartman
From: Kai-Heng Feng commit 5967116e8358899ebaa22702d09b0af57fef23e1 upstream. There's another Raydium touchscreen needs the no-lpm quirk: [1.339149] usb 1-9: New USB device found, idVendor=2386, idProduct=350e, bcdDevice= 0.00 [1.339150] usb 1-9: New USB device strings: Mfr=1, Product=2

[PATCH 5.8 010/255] ASoC: img-parallel-out: Fix a reference count leak

2020-09-01 Thread Greg Kroah-Hartman
From: Qiushi Wu [ Upstream commit 6b9fbb073636906eee9fe4d4c05a4f445b9e2a23 ] pm_runtime_get_sync() increments the runtime PM usage counter even when it returns an error code, causing incorrect ref count if pm_runtime_put_noidle() is not called in error handling paths. Thus call pm_runtime_put_no

[PATCH 5.8 002/255] ASoC: intel/skl/hda - fix probe regression on systems without i915

2020-09-01 Thread Greg Kroah-Hartman
From: Kai Vehmanen [ Upstream commit ffc6d45d96f07a32700cb6b7be2d3459e63c255a ] Starting in commit cbc7a6b5a87a ("ASoC: soc-card: add snd_soc_card_add_dai_link()"), error value from ASoc add_dai_link() is no longer ignored. The generic HDA machine driver relied on the old semantics to disable i

[PATCH 5.4 198/214] USB: cdc-acm: rework notification_buffer resizing

2020-09-01 Thread Greg Kroah-Hartman
From: Tom Rix commit f4b9d8a582f738c24ebeabce5cc15f4b8159d74e upstream. Clang static analysis reports this error cdc-acm.c:409:3: warning: Use of memory after it is freed acm_process_notification(acm, (unsigned char *)dr); There are three problems, the first one is that dr is not reset

[PATCH 5.8 015/255] media: pci: ttpci: av7110: fix possible buffer overflow caused by bad DMA value in debiirq()

2020-09-01 Thread Greg Kroah-Hartman
From: Jia-Ju Bai [ Upstream commit 6499a0db9b0f1e903d52f8244eacc1d4be00eea2 ] The value av7110->debi_virt is stored in DMA memory, and it is assigned to data, and thus data[0] can be modified at any time by malicious hardware. In this case, "if (data[0] < 2)" can be passed, but then data[0] can

[PATCH 5.8 001/255] khugepaged: khugepaged_test_exit() check mmget_still_valid()

2020-09-01 Thread Greg Kroah-Hartman
From: Hugh Dickins [ Upstream commit bbe98f9cadff58cdd6a4acaeba0efa8565dabe65 ] Move collapse_huge_page()'s mmget_still_valid() check into khugepaged_test_exit() itself. collapse_huge_page() is used for anon THP only, and earned its mmget_still_valid() check because it inserts a huge pmd entry

[PATCH 5.8 028/255] drm/amdgpu/display: fix ref count leak when pm_runtime_get_sync fails

2020-09-01 Thread Greg Kroah-Hartman
From: Navid Emamdoost [ Upstream commit f79f94765f8c39db0b7dec1d335ab046aac03f20 ] The call to pm_runtime_get_sync increments the counter even in case of failure, leading to incorrect ref count. In case of failure, decrement the ref count before returning. Signed-off-by: Navid Emamdoost Signed

[PATCH 5.8 004/255] ALSA: pci: delete repeated words in comments

2020-09-01 Thread Greg Kroah-Hartman
From: Randy Dunlap [ Upstream commit c7fabbc51352f50cc58242a6dc3b9c1a3599849b ] Drop duplicated words in sound/pci/. {and, the, at} Signed-off-by: Randy Dunlap Link: https://lore.kernel.org/r/20200806021926.32418-1-rdun...@infradead.org Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin

[PATCH 5.8 000/255] 5.8.6-rc1 review

2020-09-01 Thread Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.8.6 release. There are 255 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know. Responses should be made by Thu, 03 Sep 2020 15:09:01 +. Anything rece

[PATCH 5.8 017/255] blktrace: ensure our debugfs dir exists

2020-09-01 Thread Greg Kroah-Hartman
From: Luis Chamberlain [ Upstream commit b431ef837e3374da0db8ff6683170359aaa0859c ] We make an assumption that a debugfs directory exists, but since this can fail ensure it exists before allowing blktrace setup to complete. Otherwise we end up stuffing blktrace files on the debugfs root director

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