[PATCH 5.10 070/290] net: phy: make mdio_bus_phy_suspend/resume as __maybe_unused

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Arnd Bergmann commit 7f654157f0aefba04cd7f6297351c87b76b47b89 upstream. When CONFIG_PM_SLEEP is disabled, the compiler warns about unused functions: drivers/net/phy/phy_device.c:273:12: error: unused function 'mdio_bus_phy_suspend' [-Werror,-Wunused-function]

[PATCH 5.4 062/168] i2c: rcar: faster irq code to minimize HW race condition

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Wolfram Sang [ Upstream commit c7b514ec979e23a08c411f3d8ed39c7922751422 ] To avoid the HW race condition on R-Car Gen2 and earlier, we need to write to ICMCR as soon as possible in the interrupt handler. We can improve this by writing a static value instead of

[PATCH 4.14 75/95] staging: comedi: das6402: Fix endian problem for AI command data

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Ian Abbott commit 1c0f20b78781b9ca50dc3ecfd396d0db5b141890 upstream. The analog input subdevice supports Comedi asynchronous commands that use Comedi's 16-bit sample format. However, the call to `comedi_buf_write_samples()` is passing the address of a 32-bit

[PATCH 5.4 122/168] usbip: fix stub_dev usbip_sockfd_store() races leading to gpf

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Shuah Khan commit 9380afd6df70e24eacbdbde33afc6a3950965d22 upstream. usbip_sockfd_store() is invoked when user requests attach (import) detach (unimport) usb device from usbip host. vhci_hcd sends import request and usbip_sockfd_store() exports the device if it

[PATCH 5.10 068/290] net: stmmac: fix wrongly set buffer2 valid when sph unsupport

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Joakim Zhang commit 396e13e11577b614db77db0bbb6fca935b94eb1b upstream. In current driver, buffer2 available only when hardware supports split header. Wrongly set buffer2 valid in stmmac_rx_refill when refill buffer address. You can see that desc3 is 0x8100

[PATCH 4.14 89/95] binfmt_misc: fix possible deadlock in bm_register_write

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Lior Ribak commit e7850f4d844e0acfac7e570af611d89deade3146 upstream. There is a deadlock in bm_register_write: First, in the begining of the function, a lock is taken on the binfmt_misc root inode with inode_lock(d_inode(root)). Then, if the user used the

[PATCH 4.14 11/95] netfilter: x_tables: gpf inside xt_find_revision()

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Vasily Averin commit 8e24edddad152b998b37a7f583175137ed2e04a5 upstream. nested target/match_revfn() calls work with xt[NFPROTO_UNSPEC] lists without taking xt[NFPROTO_UNSPEC].mutex. This can race with module unload and cause host to crash: general protection

[PATCH 5.11 081/306] net: stmmac: fix watchdog timeout during suspend/resume stress test

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Joakim Zhang commit c511819d138de38e1637eedb645c207e09680d0f upstream. stmmac_xmit() call stmmac_tx_timer_arm() at the end to modify tx timer to do the transmission cleanup work. Imagine such a situation, stmmac enters suspend immediately after tx timer

[PATCH 5.4 063/168] i2c: rcar: optimize cacheline to minimize HW race condition

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Wolfram Sang [ Upstream commit 25c2e0fb5fefb8d7847214cf114d94c7aad8e9ce ] 'flags' and 'io' are needed first, so they should be at the beginning of the private struct. Signed-off-by: Wolfram Sang Reviewed-by: Niklas Söderlund Signed-off-by: Wolfram Sang

[PATCH 5.11 077/306] ixgbe: fail to create xfrm offload of IPsec tunnel mode SA

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Antony Antony commit d785e1fec60179f534fbe8d006c890e5ad186e51 upstream. Based on talks and indirect references ixgbe IPsec offlod do not support IPsec tunnel mode offload. It can only support IPsec transport mode offload. Now explicitly fail when creating non

[PATCH 4.19 097/120] staging: comedi: addi_apci_1500: Fix endian problem for command sample

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Ian Abbott commit ac0bbf55ed3be75fde1f8907e91ecd2fd589bde3 upstream. The digital input subdevice supports Comedi asynchronous commands that read interrupt status information. This uses 16-bit Comedi samples (of which only the bottom 8 bits contain status

[PATCH 5.10 124/290] net: dsa: tag_ar9331: let DSA core deal with TX reallocation

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Vladimir Oltean [ Upstream commit 86c4ad9a7876777c12fd5a7010152e4141fcb94d ] Now that we have a central TX reallocation procedure that accounts for the tagger's needed headroom in a generic way, we can remove the skb_cow_head call. Cc: Per Forlin Cc: Oleksij

[PATCH 4.19 080/120] USB: serial: ch341: add new Product ID

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Niv Sardi commit 5563b3b6420362c8a1f468ca04afe6d5f0a8d0a3 upstream. Add PID for CH340 that's found on cheap programmers. The driver works flawlessly as soon as the new PID (0x9986) is added to it. These look like ANU232MI but ship with a ch341 inside. They have

[PATCH 4.19 082/120] USB: serial: cp210x: add some more GE USB IDs

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Sebastian Reichel commit 42213a0190b535093a604945db05a4225bf43885 upstream. GE CS1000 has some more custom USB IDs for CP2102N; add them to the driver to have working auto-probing. Signed-off-by: Sebastian Reichel Cc: sta...@vger.kernel.org Signed-off-by:

[PATCH 5.11 132/306] mmc: mediatek: fix race condition between msdc_request_timeout and irq

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Chaotian Jing [ Upstream commit 0354ca6edd464a2cf332f390581977b8699ed081 ] when get request SW timeout, if CMD/DAT xfer done irq coming right now, then there is race between the msdc_request_timeout work and irq handler, and the host->cmd and host->data may set

[PATCH 4.14 77/95] staging: comedi: dmm32at: Fix endian problem for AI command data

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Ian Abbott commit 54999c0d94b3c26625f896f8e3460bc029821578 upstream. The analog input subdevice supports Comedi asynchronous commands that use Comedi's 16-bit sample format. However, the call to `comedi_buf_write_samples()` is passing the address of a 32-bit

[PATCH 4.19 079/120] USB: serial: io_edgeport: fix memory leak in edge_startup

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Pavel Skripkin commit cfdc67acc785e01a8719eeb7012709d245564701 upstream. sysbot found memory leak in edge_startup(). The problem was that when an error was received from the usb_submit_urb(), nothing was cleaned up. Reported-by:

[PATCH 5.11 133/306] mmc: sdhci-iproc: Add ACPI bindings for the RPi

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Jeremy Linton [ Upstream commit 4f9833d3ec8da34861cd0680b00c73e653877eb9 ] The RPi4 has an Arasan controller it carries over from the RPi3 and a newer eMMC2 controller. Because of a couple of quirks, it seems wiser to bind these controllers to the same driver

[PATCH 5.4 119/168] usbip: fix stub_dev to check for stream socket

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Shuah Khan commit 47ccc8fc2c9c94558b27b6f9e2582df32d29e6e8 upstream. Fix usbip_sockfd_store() to validate the passed in file descriptor is a stream socket. If the file descriptor passed was a SOCK_DGRAM socket, sock_recvmsg() can't detect end of stream. Cc:

[PATCH 4.19 081/120] USB: serial: cp210x: add ID for Acuity Brands nLight Air Adapter

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Karan Singhal commit ca667a33207daeaf9c62b106815728718def60ec upstream. IDs of nLight Air Adapter, Acuity Brands, Inc.: vid: 10c4 pid: 88d8 Signed-off-by: Karan Singhal Cc: sta...@vger.kernel.org Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman

[PATCH 4.14 69/95] staging: ks7010: prevent buffer overflow in ks_wlan_set_scan()

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Dan Carpenter commit e163b9823a0b08c3bb8dc4f5b4b5c221c24ec3e5 upstream. The user can specify a "req->essid_len" of up to 255 but if it's over IW_ESSID_MAX_SIZE (32) that can lead to memory corruption. Fixes: 13a9930d15b4 ("staging: ks7010: add driver from

[PATCH 4.14 76/95] staging: comedi: das800: Fix endian problem for AI command data

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Ian Abbott commit 459b1e8c8fe97fcba0bd1b623471713dce2c5eaf upstream. The analog input subdevice supports Comedi asynchronous commands that use Comedi's 16-bit sample format. However, the call to `comedi_buf_write_samples()` is passing the address of a 32-bit

[PATCH 5.11 136/306] powerpc/pci: Add ppc_md.discover_phbs()

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Oliver O'Halloran [ Upstream commit 5537fcb319d016ce387f818dd774179bc03217f5 ] On many powerpc platforms the discovery and initalisation of pci_controllers (PHBs) happens inside of setup_arch(). This is very early in boot (pre-initcalls) and means that we're

[PATCH 4.19 083/120] usbip: fix stub_dev to check for stream socket

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Shuah Khan commit 47ccc8fc2c9c94558b27b6f9e2582df32d29e6e8 upstream. Fix usbip_sockfd_store() to validate the passed in file descriptor is a stream socket. If the file descriptor passed was a SOCK_DGRAM socket, sock_recvmsg() can't detect end of stream. Cc:

[PATCH 5.4 124/168] usbip: fix vudc usbip_sockfd_store races leading to gpf

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Shuah Khan commit 46613c9dfa964c0c60b5385dbdf5aaa18be52a9c upstream. usbip_sockfd_store() is invoked when user requests attach (import) detach (unimport) usb gadget device from usbip host. vhci_hcd sends import request and usbip_sockfd_store() exports the device

[PATCH 4.14 81/95] sh_eth: fix TRSCER mask for R7S72100

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Sergey Shtylyov [ Upstream commit 75be7fb7f978202c4c3a1a713af4485afb2ff5f6 ] According to the RZ/A1H Group, RZ/A1M Group User's Manual: Hardware, Rev. 4.00, the TRSCER register has bit 9 reserved, hence we can't use the driver's default TRSCER mask. Add the

[PATCH 5.4 128/168] staging: rtl8188eu: prevent ->ssid overflow in rtw_wx_set_scan()

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Dan Carpenter commit 74b6b20df8cfe90ada777d621b54c32e69e27cd7 upstream. This code has a check to prevent read overflow but it needs another check to prevent writing beyond the end of the ->ssid[] array. Fixes: a2c60d42d97c ("staging: r8188eu: Add files for new

[PATCH 4.14 80/95] staging: comedi: pcl818: Fix endian problem for AI command data

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Ian Abbott commit 148e34fd33d53740642db523724226de14ee5281 upstream. The analog input subdevice supports Comedi asynchronous commands that use Comedi's 16-bit sample format. However, the call to `comedi_buf_write_samples()` is passing the address of a 32-bit

[PATCH 5.4 125/168] misc/pvpanic: Export module FDT device table

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Shile Zhang commit 65527a51c66f4edfa28602643d7dd4fa366eb826 upstream. Export the module FDT device table to ensure the FDT compatible strings are listed in the module alias. This help the pvpanic driver can be loaded on boot automatically not only the ACPI

[PATCH 4.14 79/95] staging: comedi: pcl711: Fix endian problem for AI command data

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Ian Abbott commit a084303a645896e834883f2c5170d044410dfdb3 upstream. The analog input subdevice supports Comedi asynchronous commands that use Comedi's 16-bit sample format. However, the call to `comedi_buf_write_samples()` is passing the address of a 32-bit

[PATCH 4.14 83/95] block: rsxx: fix error return code of rsxx_pci_probe()

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Jia-Ju Bai [ Upstream commit df66617bfe87487190a60783d26175b65d2502ce ] When create_singlethread_workqueue returns NULL to card->event_wq, no error return code of rsxx_pci_probe() is assigned. To fix this bug, st is assigned with -ENOMEM in this case. Fixes:

[PATCH 5.11 144/306] sparc32: Limit memblock allocation to low memory

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Andreas Larsson [ Upstream commit bda166930c37604ffa93f2425426af6921ec575a ] Commit cca079ef8ac29a7c02192d2bad2ffe4c0c5ffdd0 changed sparc32 to use memblocks instead of bootmem, but also made high memory available via memblock allocation which does not work

[PATCH 4.19 087/120] usbip: fix vhci_hcd attach_store() races leading to gpf

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Shuah Khan commit 718ad9693e3656120064b715fe931f43a6201e67 upstream. attach_store() is invoked when user requests import (attach) a device from usbip host. Attach and detach are governed by local state and shared state - Shared state (usbip device status) -

[PATCH 5.4 129/168] staging: rtl8712: unterminated string leads to read overflow

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Dan Carpenter commit d660f4f42ccea50262c6ee90c8e7ad19a69fb225 upstream. The memdup_user() function does not necessarily return a NUL terminated string so this can lead to a read overflow. Switch from memdup_user() to strndup_user() to fix this bug. Fixes:

[PATCH 4.14 82/95] NFSv4.2: fix return value of _nfs4_get_security_label()

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Ondrej Mosnacek [ Upstream commit 53cb245454df5b13d7063162afd7a785aed6ebf2 ] An xattr 'get' handler is expected to return the length of the value on success, yet _nfs4_get_security_label() (and consequently also nfs4_xattr_get_nfs4_label(), which is used as an

[PATCH 4.19 089/120] staging: rtl8192u: fix ->ssid overflow in r8192_wx_set_scan()

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Dan Carpenter commit 87107518d7a93fec6cdb2559588862afeee800fb upstream. We need to cap len at IW_ESSID_MAX_SIZE (32) to avoid memory corruption. This can be controlled by the user via the ioctl. Fixes: 5f53d8ca3d5d ("Staging: add rtl8192SU wireless usb driver")

[PATCH 5.4 132/168] staging: rtl8712: Fix possible buffer overflow in r8712_sitesurvey_cmd

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Lee Gibson commit b93c1e3981af19527beee1c10a2bef67a228c48c upstream. Function r8712_sitesurvey_cmd calls memcpy without checking the length. A user could control that length and trigger a buffer overflow. Fix by checking the length is within the maximum allowed

[PATCH 5.4 134/168] staging: comedi: addi_apci_1032: Fix endian problem for COS sample

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Ian Abbott commit 25317f428a78fde71b2bf3f24d05850f08a73a52 upstream. The Change-Of-State (COS) subdevice supports Comedi asynchronous commands to read 16-bit change-of-state values. However, the interrupt handler is calling `comedi_buf_write_samples()` with the

[PATCH 5.10 133/290] scsi: ufs: WB is only available on LUN #0 to #7

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Jaegeuk Kim [ Upstream commit a2fca52ee640a04112ed9d9a137c940ea6ad288e ] Kernel stack violation when getting unit_descriptor/wb_buf_alloc_units from rpmb LUN. The reason is that the unit descriptor length is different per LU. The length of Normal LU is 45 while

[PATCH 5.4 133/168] staging: rtl8192e: Fix possible buffer overflow in _rtl92e_wx_set_scan

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Lee Gibson commit 8687bf9ef9551bcf93897e33364d121667b1aadf upstream. Function _rtl92e_wx_set_scan calls memcpy without checking the length. A user could control that length and trigger a buffer overflow. Fix by checking the length is within the maximum allowed

[PATCH 5.10 137/290] mmc: mediatek: fix race condition between msdc_request_timeout and irq

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Chaotian Jing [ Upstream commit 0354ca6edd464a2cf332f390581977b8699ed081 ] when get request SW timeout, if CMD/DAT xfer done irq coming right now, then there is race between the msdc_request_timeout work and irq handler, and the host->cmd and host->data may set

[PATCH 5.4 139/168] staging: comedi: dmm32at: Fix endian problem for AI command data

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Ian Abbott commit 54999c0d94b3c26625f896f8e3460bc029821578 upstream. The analog input subdevice supports Comedi asynchronous commands that use Comedi's 16-bit sample format. However, the call to `comedi_buf_write_samples()` is passing the address of a 32-bit

[PATCH 4.14 78/95] staging: comedi: me4000: Fix endian problem for AI command data

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Ian Abbott commit b39dfcced399d31e7c4b7341693b18e01c8f655e upstream. The analog input subdevice supports Comedi asynchronous commands that use Comedi's 16-bit sample format. However, the calls to `comedi_buf_write_samples()` are passing the address of a 32-bit

[PATCH 5.10 134/290] udf: fix silent AED tagLocation corruption

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Steven J. Magnani [ Upstream commit 63c9e47a1642fc817654a1bc18a6ec4bbcc0f056 ] When extending a file, udf_do_extend_file() may enter following empty indirect extent. At the end of udf_do_extend_file() we revert prev_epos to point to the last written extent.

[PATCH 4.19 091/120] staging: rtl8712: unterminated string leads to read overflow

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Dan Carpenter commit d660f4f42ccea50262c6ee90c8e7ad19a69fb225 upstream. The memdup_user() function does not necessarily return a NUL terminated string so this can lead to a read overflow. Switch from memdup_user() to strndup_user() to fix this bug. Fixes:

[PATCH 5.11 149/306] drivers/base: build kunit tests without structleak plugin

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Arnd Bergmann [ Upstream commit 38009c766725a9877ea8866fc813a5460011817f ] The structleak plugin causes the stack frame size to grow immensely: drivers/base/test/property-entry-test.c: In function 'pe_test_reference':

[PATCH 5.4 123/168] usbip: fix vhci_hcd attach_store() races leading to gpf

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Shuah Khan commit 718ad9693e3656120064b715fe931f43a6201e67 upstream. attach_store() is invoked when user requests import (attach) a device from usbip host. Attach and detach are governed by local state and shared state - Shared state (usbip device status) -

[PATCH 5.11 147/306] PCI: xgene-msi: Fix race in installing chained irq handler

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Martin Kaiser [ Upstream commit a93c00e5f975f23592895b7e83f35de2d36b7633 ] Fix a race where a pending interrupt could be received and the handler called before the handler's data has been setup, by converting to irq_set_chained_handler_and_data(). See also

[PATCH 4.19 096/120] staging: comedi: addi_apci_1032: Fix endian problem for COS sample

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Ian Abbott commit 25317f428a78fde71b2bf3f24d05850f08a73a52 upstream. The Change-Of-State (COS) subdevice supports Comedi asynchronous commands to read 16-bit change-of-state values. However, the interrupt handler is calling `comedi_buf_write_samples()` with the

[PATCH 4.14 88/95] powerpc/64s: Fix instruction encoding for lis in ppc_function_entry()

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Naveen N. Rao commit cea15316ceee2d4a51dfdecd79e08a438135416c upstream. 'lis r2,N' is 'addis r2,0,N' and the instruction encoding in the macro LIS_R2 is incorrect (it currently maps to 'addis r0,r2,N'). Fix the same. Fixes: c71b7eff426f ("powerpc: Add ABIv2

[PATCH 4.19 093/120] staging: ks7010: prevent buffer overflow in ks_wlan_set_scan()

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Dan Carpenter commit e163b9823a0b08c3bb8dc4f5b4b5c221c24ec3e5 upstream. The user can specify a "req->essid_len" of up to 255 but if it's over IW_ESSID_MAX_SIZE (32) that can lead to memory corruption. Fixes: 13a9930d15b4 ("staging: ks7010: add driver from

[PATCH 5.4 136/168] staging: comedi: adv_pci1710: Fix endian problem for AI command data

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Ian Abbott commit b2e78630f733a76508b53ba680528ca39c890e82 upstream. The analog input subdevice supports Comedi asynchronous commands that use Comedi's 16-bit sample format. However, the calls to `comedi_buf_write_samples()` are passing the address of a 32-bit

[PATCH 5.10 126/290] enetc: Fix unused var build warning for CONFIG_OF

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Arnd Bergmann [ Upstream commit 4560b2a3ecdd5d587c4c6eea4339899f173a559a ] When CONFIG_OF is disabled, there is a harmless warning about an unused variable: enetc_pf.c: In function 'enetc_phylink_create': enetc_pf.c:981:17: error: unused variable 'dev'

[PATCH 5.10 136/290] mmc: mxs-mmc: Fix a resource leak in an error handling path in mxs_mmc_probe()

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Christophe JAILLET [ Upstream commit 0bb7e560f821c7770973a94e346654c4bdccd42c ] If 'mmc_of_parse()' fails, we must undo the previous 'dma_request_chan()' call. Signed-off-by: Christophe JAILLET Link:

[PATCH 5.11 148/306] PCI: mediatek: Add missing of_node_put() to fix reference leak

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Krzysztof Wilczyński [ Upstream commit 42814c438aac79746d310f413a27d5b0b959c5de ] The for_each_available_child_of_node helper internally makes use of the of_get_next_available_child() which performs an of_node_get() on each iteration when searching for next

[PATCH 4.14 86/95] include/linux/sched/mm.h: use rcu_dereference in in_vfork()

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Matthew Wilcox (Oracle) [ Upstream commit 149fc787353f65b7e72e05e7b75d34863266c3e2 ] Fix a sparse warning by using rcu_dereference(). Technically this is a bug and a sufficiently aggressive compiler could reload the `real_parent' pointer outside the protection

[PATCH 5.11 146/306] Input: applespi - dont wait for responses to commands indefinitely.

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Ronald Tschalär [ Upstream commit 0ce1ac23149c6da939a5926c098c270c58c317a0 ] The response to a command may never arrive or it may be corrupted (and hence dropped) for some reason. While exceedingly rare, when it did happen it blocked all further commands. One

[PATCH 5.10 135/290] iommu/vt-d: Clear PRQ overflow only when PRQ is empty

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Lu Baolu [ Upstream commit 28a77185f1cd0650b664f546141433a7a615 ] It is incorrect to always clear PRO when it's set w/o first checking whether the overflow condition has been cleared. Current code assumes that if an overflow condition occurs it must have

[PATCH 4.14 85/95] stop_machine: mark helpers __always_inline

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Arnd Bergmann [ Upstream commit cbf78d85079cee662c45749ef4f744d41be85d48 ] With clang-13, some functions only get partially inlined, with a specialized version referring to a global variable. This triggers a harmless build-time check for the intel-rng driver:

[PATCH 5.11 135/306] Platform: OLPC: Fix probe error handling

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Lubomir Rintel [ Upstream commit cec551ea0d41c679ed11d758e1a386e20285b29d ] Reset ec_priv if probe ends unsuccessfully. Signed-off-by: Lubomir Rintel Link: https://lore.kernel.org/r/20210126073740.10232-2-lkund...@v3.sk Reviewed-by: Hans de Goede

[PATCH 5.4 126/168] misc: fastrpc: restrict user apps from sending kernel RPC messages

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Dmitry Baryshkov commit 20c40794eb85ea29852d7bc37c55713802a543d6 upstream. Verify that user applications are not using the kernel RPC message handle to restrict them from directly attaching to guest OS on the remote subsystem. This is a port of CVE-2019-2308

[PATCH 5.4 130/168] staging: rtl8188eu: fix potential memory corruption in rtw_check_beacon_data()

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Dan Carpenter commit d4ac640322b06095128a5c45ba4a1e80929fe7f3 upstream. The "ie_len" is a value in the 1-255 range that comes from the user. We have to cap it to ensure that it's not too large or it could lead to memory corruption. Fixes: 9a7fe54ddc3a

[PATCH 5.4 135/168] staging: comedi: addi_apci_1500: Fix endian problem for command sample

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Ian Abbott commit ac0bbf55ed3be75fde1f8907e91ecd2fd589bde3 upstream. The digital input subdevice supports Comedi asynchronous commands that read interrupt status information. This uses 16-bit Comedi samples (of which only the bottom 8 bits contain status

[PATCH 4.19 092/120] staging: rtl8188eu: fix potential memory corruption in rtw_check_beacon_data()

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Dan Carpenter commit d4ac640322b06095128a5c45ba4a1e80929fe7f3 upstream. The "ie_len" is a value in the 1-255 range that comes from the user. We have to cap it to ensure that it's not too large or it could lead to memory corruption. Fixes: 9a7fe54ddc3a

[PATCH 5.11 143/306] clk: qcom: gdsc: Implement NO_RET_PERIPH flag

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: AngeloGioacchino Del Regno [ Upstream commit 785c02eb35009a4be6dbc68f4f7d916e90b7177d ] In some rare occasions, we want to only set the RETAIN_MEM bit, but not the RETAIN_PERIPH one: this is seen on at least SDM630/636/660's GPU-GX GDSC, where unsetting and

[PATCH 5.4 127/168] staging: rtl8192u: fix ->ssid overflow in r8192_wx_set_scan()

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Dan Carpenter commit 87107518d7a93fec6cdb2559588862afeee800fb upstream. We need to cap len at IW_ESSID_MAX_SIZE (32) to avoid memory corruption. This can be controlled by the user via the ioctl. Fixes: 5f53d8ca3d5d ("Staging: add rtl8192SU wireless usb driver")

[PATCH 5.10 128/290] ath11k: peer delete synchronization with firmware

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Ritesh Singh [ Upstream commit 690ace20ff790f443c3cbaf12e1769e4eb0072db ] Peer creation in firmware fails, if last peer deletion is still in progress. Hence, add wait for the event after deleting every peer from host driver to synchronize with firmware.

[PATCH 4.14 84/95] configfs: fix a use-after-free in __configfs_open_file

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Daiyue Zhang [ Upstream commit 14fbbc8297728e880070f7b077b3301a8c698ef9 ] Commit b0841eefd969 ("configfs: provide exclusion between IO and removals") uses ->frag_dead to mark the fragment state, thus no bothering with extra refcount on config_item when opening a

[PATCH 5.4 082/168] i40e: Fix memory leak in i40e_probe

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Keita Suzuki [ Upstream commit 58cab46c622d6324e47bd1c533693c94498e4172 ] Struct i40e_veb is allocated in function i40e_setup_pf_switch, and stored to an array field veb inside struct i40e_pf. However when i40e_setup_misc_vector fails, this memory leaks. Fix

[PATCH 5.11 145/306] sparc64: Use arch_validate_flags() to validate ADI flag

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Khalid Aziz [ Upstream commit 147d8622f2a26ef34beacc60e1ed8b66c2fa457f ] When userspace calls mprotect() to enable ADI on an address range, do_mprotect_pkey() calls arch_validate_prot() to validate new protection flags. arch_validate_prot() for sparc looks at

[PATCH 4.19 088/120] usbip: fix vudc usbip_sockfd_store races leading to gpf

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Shuah Khan commit 46613c9dfa964c0c60b5385dbdf5aaa18be52a9c upstream. usbip_sockfd_store() is invoked when user requests attach (import) detach (unimport) usb gadget device from usbip host. vhci_hcd sends import request and usbip_sockfd_store() exports the device

[PATCH 5.11 141/306] powerpc/64: Fix stack trace not displaying final frame

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Michael Ellerman [ Upstream commit e3de1e291fa58a1ab0f471a4b458eff2514e4b5f ] In commit bf13718bc57a ("powerpc: show registers when unwinding interrupt frames") we changed our stack dumping logic to show the full registers whenever we find an interrupt frame on

[PATCH 5.10 130/290] ath11k: fix AP mode for QCA6390

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Kalle Valo [ Upstream commit 77d7e87128d4dfb400df4208b2812160e999c165 ] Commit c134d1f8c436 ("ath11k: Handle errors if peer creation fails") completely broke AP mode on QCA6390: kernel: [ 151.230734] ath11k_pci :06:00.0: failed to create peer after vdev

[PATCH 4.19 090/120] staging: rtl8188eu: prevent ->ssid overflow in rtw_wx_set_scan()

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Dan Carpenter commit 74b6b20df8cfe90ada777d621b54c32e69e27cd7 upstream. This code has a check to prevent read overflow but it needs another check to prevent writing beyond the end of the ->ssid[] array. Fixes: a2c60d42d97c ("staging: r8188eu: Add files for new

[PATCH 5.11 140/306] HID: logitech-dj: add support for the new lightspeed connection iteration

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Filipe Laíns [ Upstream commit fab3a95654eea01d6b0204995be8b7492a00d001 ] This new connection type is the new iteration of the Lightspeed connection and will probably be used in some of the newer gaming devices. It is currently use in the G Pro X Superlight.

[PATCH 5.10 129/290] ath11k: start vdev if a bss peer is already created

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Carl Huang [ Upstream commit aa44b2f3ecd41f90b7e477158036648a49d21a32 ] For QCA6390, bss peer must be created before vdev is to start. This change is to start vdev if a bss peer is created. Otherwise, ath11k delays to start vdev. This fixes an issue in a case

[PATCH 5.4 131/168] staging: ks7010: prevent buffer overflow in ks_wlan_set_scan()

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Dan Carpenter commit e163b9823a0b08c3bb8dc4f5b4b5c221c24ec3e5 upstream. The user can specify a "req->essid_len" of up to 255 but if it's over IW_ESSID_MAX_SIZE (32) that can lead to memory corruption. Fixes: 13a9930d15b4 ("staging: ks7010: add driver from

[PATCH 5.10 125/290] net: dsa: tag_mtk: fix 802.1ad VLAN egress

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: DENG Qingfang [ Upstream commit 9200f515c41f4cbaeffd8fdd1d8b6373a18b1b67 ] A different TPID bit is used for 802.1ad VLAN frames. Reported-by: Ilario Gelmetti Fixes: f0af34317f4b ("net: dsa: mediatek: combine MediaTek tag with VLAN tag") Signed-off-by: DENG

[PATCH 4.19 084/120] usbip: fix vhci_hcd to check for stream socket

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Shuah Khan commit f55a0571690c4aae03180e001522538c0927432f upstream. Fix attach_store() to validate the passed in file descriptor is a stream socket. If the file descriptor passed was a SOCK_DGRAM socket, sock_recvmsg() can't detect end of stream. Cc:

[PATCH 5.10 131/290] i2c: rcar: faster irq code to minimize HW race condition

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Wolfram Sang [ Upstream commit c7b514ec979e23a08c411f3d8ed39c7922751422 ] To avoid the HW race condition on R-Car Gen2 and earlier, we need to write to ICMCR as soon as possible in the interrupt handler. We can improve this by writing a static value instead of

[PATCH 5.10 132/290] i2c: rcar: optimize cacheline to minimize HW race condition

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Wolfram Sang [ Upstream commit 25c2e0fb5fefb8d7847214cf114d94c7aad8e9ce ] 'flags' and 'io' are needed first, so they should be at the beginning of the private struct. Signed-off-by: Wolfram Sang Reviewed-by: Niklas Söderlund Signed-off-by: Wolfram Sang

[PATCH 4.19 022/120] net: sched: avoid duplicates in classes dump

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Maximilian Heyne commit bfc2560563586372212b0a8aeca7428975fa91fe upstream. This is a follow up of commit ea3274695353 ("net: sched: avoid duplicates in qdisc dump") which has fixed the issue only for the qdisc dump. The duplicate printing also occurs when

[PATCH 5.11 139/306] powerpc/perf: Record counter overflow always if SAMPLE_IP is unset

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Athira Rajeev [ Upstream commit d137845c973147a22622cc76c7b0bc16f6206323 ] While sampling for marked events, currently we record the sample only if the SIAR valid bit of Sampled Instruction Event Register (SIER) is set. SIAR_VALID bit is used for fetching the

[PATCH 5.4 064/168] udf: fix silent AED tagLocation corruption

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Steven J. Magnani [ Upstream commit 63c9e47a1642fc817654a1bc18a6ec4bbcc0f056 ] When extending a file, udf_do_extend_file() may enter following empty indirect extent. At the end of udf_do_extend_file() we revert prev_epos to point to the last written extent.

[PATCH 5.10 127/290] net: enetc: initialize RFS/RSS memories for unused ports too

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Vladimir Oltean [ Upstream commit 3222b5b613db558e9a494bbf53f3c984d90f71ea ] Michael reports that since linux-next-20210211, the AER messages for ECC errors have started reappearing, and this time they can be reliably reproduced with the first ping on one of his

[PATCH 4.19 023/120] net: usb: qmi_wwan: allow qmimux add/del with master up

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Daniele Palmas commit 6c59cff38e66584ae3ac6c2f0cbd8d039c710ba7 upstream. There's no reason for preventing the creation and removal of qmimux network interfaces when the underlying interface is up. This makes qmi_wwan mux implementation more similar to the rmnet

[PATCH 4.19 041/120] net: phy: fix save wrong speed and duplex problem if autoneg is on

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Guangbin Huang [ Upstream commit d9032dba5a2b2bbf0fdce67c8795300ec9923b43 ] If phy uses generic driver and autoneg is on, enter command "ethtool -s eth0 speed 50" will not change phy speed actually, but command "ethtool eth0" shows speed is 50Mb/s because

[PATCH 4.19 071/120] USB: gadget: u_ether: Fix a configfs return code

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Dan Carpenter commit 650bf52208d804ad5ee449c58102f8dc43175573 upstream. If the string is invalid, this should return -EINVAL instead of 0. Fixes: 73517cf49bd4 ("usb: gadget: add RNDIS configfs options for class/subclass/protocol") Cc: stable Acked-by: Lorenzo

[PATCH 5.10 123/290] net: dsa: tag_gswip: let DSA core deal with TX reallocation

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Vladimir Oltean [ Upstream commit 9b9826ae117f211bcbdc75db844d5fd8b159fc59 ] Now that we have a central TX reallocation procedure that accounts for the tagger's needed headroom in a generic way, we can remove the skb_cow_head call. This one is interesting, the

[PATCH 5.10 089/290] drm/amdgpu/display: simplify backlight setting

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Alex Deucher commit a2f8d988698d7d3645b045f4940415b045140b81 upstream. Avoid the extra wrapper function. Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher Cc: sta...@vger.kernel.org Signed-off-by: Greg Kroah-Hartman ---

[PATCH 5.4 121/168] usbip: fix vudc to check for stream socket

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Shuah Khan commit 6801854be94fe8819b3894979875ea31482f5658 upstream. Fix usbip_sockfd_store() to validate the passed in file descriptor is a stream socket. If the file descriptor passed was a SOCK_DGRAM socket, sock_recvmsg() can't detect end of stream. Cc:

[PATCH 4.14 66/95] staging: rtl8188eu: prevent ->ssid overflow in rtw_wx_set_scan()

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Dan Carpenter commit 74b6b20df8cfe90ada777d621b54c32e69e27cd7 upstream. This code has a check to prevent read overflow but it needs another check to prevent writing beyond the end of the ->ssid[] array. Fixes: a2c60d42d97c ("staging: r8188eu: Add files for new

[PATCH 4.14 74/95] staging: comedi: adv_pci1710: Fix endian problem for AI command data

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Ian Abbott commit b2e78630f733a76508b53ba680528ca39c890e82 upstream. The analog input subdevice supports Comedi asynchronous commands that use Comedi's 16-bit sample format. However, the calls to `comedi_buf_write_samples()` are passing the address of a 32-bit

[PATCH 5.10 091/290] drm/amdgpu/display: handle aux backlight in backlight_get_brightness

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Alex Deucher commit 0ad3e64eb46d8c47de3af552e282894e3893e973 upstream. Need to fetch it via aux. Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher Cc: sta...@vger.kernel.org Signed-off-by: Greg Kroah-Hartman ---

[PATCH 5.11 099/306] drm/amd/display: Fix nested FPU context in dcn21_validate_bandwidth()

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Holger Hoffstätte commit 15e8b95d5f7509e0b09289be8c422c459c9f0412 upstream. Commit 41401ac67791 added FPU wrappers to dcn21_validate_bandwidth(), which was correct. Unfortunately a nested function alredy contained DC_FP_START()/DC_FP_END() calls, which results

[PATCH 4.14 34/95] mmc: mediatek: fix race condition between msdc_request_timeout and irq

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Chaotian Jing [ Upstream commit 0354ca6edd464a2cf332f390581977b8699ed081 ] when get request SW timeout, if CMD/DAT xfer done irq coming right now, then there is race between the msdc_request_timeout work and irq handler, and the host->cmd and host->data may set

[PATCH 5.10 090/290] drm/amdgpu/display: dont assert in set backlight function

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Alex Deucher commit dfd8b7fbd985ec1cf76fe10f2875a50b10833740 upstream. It just spams the logs. Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher Cc: sta...@vger.kernel.org Signed-off-by: Greg Kroah-Hartman ---

[PATCH 4.14 56/95] USB: serial: io_edgeport: fix memory leak in edge_startup

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Pavel Skripkin commit cfdc67acc785e01a8719eeb7012709d245564701 upstream. sysbot found memory leak in edge_startup(). The problem was that when an error was received from the usb_submit_urb(), nothing was cleaned up. Reported-by:

[PATCH 5.10 109/290] s390/qeth: dont replace a fully completed async TX buffer

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Julian Wiedmann [ Upstream commit db4ffdcef7c9a842e55228c9faef7abf8b72382f ] For TX buffers that require an additional async notification via QAOB, the TX completion code can now manage all the necessary processing if the notification has already occurred (or is

[PATCH 5.4 103/168] Goodix Fingerprint device is not a modem

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Yorick de Wid commit 4d8654e81db7346f915eca9f1aff18f385cab621 upstream. The CDC ACM driver is false matching the Goodix Fingerprint device against the USB_CDC_ACM_PROTO_AT_V25TER. The Goodix Fingerprint device is a biometrics sensor that should be handled in

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