Re: [PATCH -next] applicom: fix some err codes returned by ac_ioctl

2021-03-28 Thread gregkh
On Wed, Mar 24, 2021 at 01:03:50PM +0100, Arnd Bergmann wrote: > On Wed, Mar 24, 2021 at 8:20 AM Xu Jia wrote: > > > > When cmd > 6 or copy_to_user() fail, The variable 'ret' would not be > > returned back. Fix the 'ret' set but not used. > > > > Signed-off-by: Xu Jia > > Reviewed-by: Arnd

Re: Linux 4.9.262

2021-03-17 Thread gregkh
From: Greg Kroah-Hartman diff --git a/Makefile b/Makefile index 7a233c641906..be5eac0a12d3 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 9 -SUBLEVEL = 261 +SUBLEVEL = 262 EXTRAVERSION = NAME = Roaring Lionus diff --git a/arch/alpha/include/asm/uaccess.h

Linux 4.9.262

2021-03-17 Thread gregkh
From: Greg Kroah-Hartman I'm announcing the release of the 4.9.262 kernel. All users of the 4.9 kernel series must upgrade. The updated 4.9.y git tree can be found at: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.9.y and can be browsed at the normal

Re: Linux 4.4.262

2021-03-17 Thread gregkh
From: Greg Kroah-Hartman diff --git a/Makefile b/Makefile index 607f1b19555f..11acd6dd024a 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 4 -SUBLEVEL = 261 +SUBLEVEL = 262 EXTRAVERSION = NAME = Blurry Fish Butt diff --git a/arch/alpha/include/asm/Kbuild

Linux 4.4.262

2021-03-17 Thread gregkh
From: Greg Kroah-Hartman I'm announcing the release of the 4.4.262 kernel. All users of the 4.4 kernel series must upgrade. The updated 4.4.y git tree can be found at: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.4.y and can be browsed at the normal

Re: Re: [PATCH v2] staging: rtl8192u: remove extra lines

2021-03-16 Thread gregkh
On Tue, Mar 16, 2021 at 06:03:17PM +0800, 赵晓 wrote: > This email message is intended only for the use of the individual or entity > who > /which is the intended recipient and may contain information that is > privileged > or confidential. If you are not the intended recipient, you are hereby >

[PATCH] MAINTAINERS: move the staging subsystem to lists.linux.dev

2021-03-16 Thread gregkh
STAGING SUBSYSTEM M: Greg Kroah-Hartman -L: de...@driverdev.osuosl.org +L: linux-stag...@lists.linux.dev S: Supported T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git F: drivers/staging/ -- 2.30.2

[PATCH 5.11 303/306] mm/memcg: set memcg when splitting page

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Zhou Guanghui commit e1baddf8475b06cc56f4bafecf9a32a124343d9f upstream. As described in the split_page() comment, for the non-compound high order page, the sub-pages must be freed individually. If the memcg of the first page is valid, the tail pages cannot be

[PATCH 5.11 304/306] mm/memcg: rename mem_cgroup_split_huge_fixup to split_page_memcg and add nr_pages argument

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Zhou Guanghui commit be6c8982e4ab9a41907555f601b711a7e2a17d4c upstream. Rename mem_cgroup_split_huge_fixup to split_page_memcg and explicitly pass in page number argument. In this way, the interface name is more common and can be used by potential users. In

[PATCH 5.11 305/306] mm/page_alloc.c: refactor initialization of struct page for holes in memory layout

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Mike Rapoport commit 0740a50b9baa4472cfb12442df4b39e2712a64a4 upstream. There could be struct pages that are not backed by actual physical memory. This can happen when the actual memory bank is not a multiple of SECTION_SIZE or when an architecture does not

[PATCH 5.11 301/306] mm/userfaultfd: fix memory corruption due to writeprotect

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Nadav Amit commit 6ce64428d62026a10cb5d80138ff2f90cc21d367 upstream. Userfaultfd self-test fails occasionally, indicating a memory corruption. Analyzing this problem indicates that there is a real bug since mmap_lock is only taken for read in

[PATCH 5.11 306/306] KVM: arm64: Fix nVHE hyp panic host context restore

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Andrew Scull Commit c4b000c3928d4f20acef79dccf3a65ae3795e0b0 upstream. When panicking from the nVHE hyp and restoring the host context, x29 is expected to hold a pointer to the host context. This wasn't being done so fix it to make sure there's a valid pointer

[PATCH 5.11 302/306] mm/madvise: replace ptrace attach requirement for process_madvise

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Suren Baghdasaryan commit 96cfe2c0fd23ea7c2368d14f769d287e7ae1082e upstream. process_madvise currently requires ptrace attach capability. PTRACE_MODE_ATTACH gives one process complete control over another process. It effectively removes the security boundary

[PATCH 5.11 300/306] mm/highmem.c: fix zero_user_segments() with start > end

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: OGAWA Hirofumi commit 184cee516f3e24019a08ac8eb5c7cf04c00933cb upstream. zero_user_segments() is used from __block_write_begin_int(), for example like the following zero_user_segments(page, 4096, 1024, 512, 918) But new the zero_user_segments()

[PATCH 5.11 299/306] KVM: arm64: Fix exclusive limit for IPA size

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Marc Zyngier commit 262b003d059c6671601a19057e9fe1a5e7f23722 upstream. When registering a memslot, we check the size and location of that memslot against the IPA size to ensure that we can provide guest access to the whole of the memory. Unfortunately, this

[PATCH 5.11 298/306] KVM: arm64: Reject VM creation when the default IPA size is unsupported

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Marc Zyngier commit 7d717558dd5ef10d28866750d5c24ff892ea3778 upstream. KVM/arm64 has forever used a 40bit default IPA space, partially due to its 32bit heritage (where the only choice is 40bit). However, there are implementations in the wild that have a *cough*

[PATCH 5.11 297/306] KVM: arm64: nvhe: Save the SPE context early

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Suzuki K Poulose commit b96b0c5de685df82019e16826a282d53d86d112c upstream. The nVHE KVM hyp drains and disables the SPE buffer, before entering the guest, as the EL1&0 translation regime is going to be loaded with that of the guest. But this operation is

[PATCH 5.11 293/306] KVM: kvmclock: Fix vCPUs > 64 cant be online/hotpluged

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Wanpeng Li commit d7eb79c6290c7ae4561418544072e0a3266e7384 upstream. # lscpu Architecture: x86_64 CPU op-mode(s):32-bit, 64-bit Byte Order:Little Endian CPU(s):88 On-line CPU(s) list: 0-63 Off-line CPU(s) list:

[PATCH 5.11 294/306] KVM: arm64: Ensure I-cache isolation between vcpus of a same VM

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Marc Zyngier commit 01dc9262ff5797b675c32c0c6bc682777d23de05 upstream. It recently became apparent that the ARMv8 architecture has interesting rules regarding attributes being used when fetching instructions if the MMU is off at Stage-1. In this situation, the

[PATCH 5.11 296/306] KVM: arm64: Avoid corrupting vCPU context register in guest exit

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Will Deacon commit 31948332d5fa392ad933f4a6a10026850649ed76 upstream. Commit 7db21530479f ("KVM: arm64: Restore hyp when panicking in guest context") tracks the currently running vCPU, clearing the pointer to NULL on exit from a guest. Unfortunately, the use of

[PATCH 5.11 295/306] KVM: arm64: Fix range alignment when walking page tables

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Jia He commit 357ad203d45c0f9d76a8feadbd5a1c5d460c638b upstream. When walking the page tables at a given level, and if the start address for the range isn't aligned for that level, we propagate the misalignment on each iteration at that level. This results in

[PATCH 5.10 282/290] KVM: arm64: Fix exclusive limit for IPA size

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Marc Zyngier commit 262b003d059c6671601a19057e9fe1a5e7f23722 upstream. When registering a memslot, we check the size and location of that memslot against the IPA size to ensure that we can provide guest access to the whole of the memory. Unfortunately, this

[PATCH 5.10 281/290] KVM: arm64: Reject VM creation when the default IPA size is unsupported

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Marc Zyngier commit 7d717558dd5ef10d28866750d5c24ff892ea3778 upstream. KVM/arm64 has forever used a 40bit default IPA space, partially due to its 32bit heritage (where the only choice is 40bit). However, there are implementations in the wild that have a *cough*

[PATCH 5.10 277/290] KVM: kvmclock: Fix vCPUs > 64 cant be online/hotpluged

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Wanpeng Li commit d7eb79c6290c7ae4561418544072e0a3266e7384 upstream. # lscpu Architecture: x86_64 CPU op-mode(s):32-bit, 64-bit Byte Order:Little Endian CPU(s):88 On-line CPU(s) list: 0-63 Off-line CPU(s) list:

[PATCH 5.10 289/290] KVM: arm64: Fix nVHE hyp panic host context restore

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Andrew Scull Commit c4b000c3928d4f20acef79dccf3a65ae3795e0b0 upstream. When panicking from the nVHE hyp and restoring the host context, x29 is expected to hold a pointer to the host context. This wasn't being done so fix it to make sure there's a valid pointer

[PATCH 5.10 288/290] xen/events: avoid handling the same event on two cpus at the same time

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Juergen Gross commit b6622798bc50b625a1e62f82c7190df40c1f5b21 upstream. When changing the cpu affinity of an event it can happen today that (with some unlucky timing) the same event will be handled on the old and the new cpu at the same time. Avoid that by

[PATCH 5.10 290/290] RDMA/umem: Use ib_dma_max_seg_size instead of dma_get_max_seg_size

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Christoph Hellwig commit b116c702791a9834e6485f67ca6267d9fdf59b87 upstream. RDMA ULPs must not call DMA mapping APIs directly but instead use the ib_dma_* wrappers. Fixes: 0c16d9635e3a ("RDMA/umem: Move to allocate SG table from pages") Link:

[PATCH 5.10 287/290] xen/events: dont unmask an event channel when an eoi is pending

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Juergen Gross commit 25da4618af240fbec6112401498301a6f2bc9702 upstream. An event channel should be kept masked when an eoi is pending for it. When being migrated to another cpu it might be unmasked, though. In order to avoid this keep three different flags for

[PATCH 5.10 286/290] mm/page_alloc.c: refactor initialization of struct page for holes in memory layout

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Mike Rapoport commit 0740a50b9baa4472cfb12442df4b39e2712a64a4 upstream. There could be struct pages that are not backed by actual physical memory. This can happen when the actual memory bank is not a multiple of SECTION_SIZE or when an architecture does not

[PATCH 5.10 285/290] KVM: arm64: Ensure I-cache isolation between vcpus of a same VM

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Marc Zyngier Commit 01dc9262ff5797b675c32c0c6bc682777d23de05 upstream. It recently became apparent that the ARMv8 architecture has interesting rules regarding attributes being used when fetching instructions if the MMU is off at Stage-1. In this situation, the

[PATCH 5.10 284/290] mm/madvise: replace ptrace attach requirement for process_madvise

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Suren Baghdasaryan commit 96cfe2c0fd23ea7c2368d14f769d287e7ae1082e upstream. process_madvise currently requires ptrace attach capability. PTRACE_MODE_ATTACH gives one process complete control over another process. It effectively removes the security boundary

[PATCH 5.10 283/290] mm/userfaultfd: fix memory corruption due to writeprotect

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Nadav Amit commit 6ce64428d62026a10cb5d80138ff2f90cc21d367 upstream. Userfaultfd self-test fails occasionally, indicating a memory corruption. Analyzing this problem indicates that there is a real bug since mmap_lock is only taken for read in

[PATCH 5.11 250/306] drm/ttm: Fix TTM page pool accounting

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Anthony DeRossi [ Upstream commit ca63d76fd2319db984f2875992643f900caf2c72 ] Freed pages are not subtracted from the allocated_pages counter in ttm_pool_type_fini(), causing a leak in the count on device removal. The next shrinker invocation loops forever trying

[PATCH 5.10 278/290] KVM: arm64: Fix range alignment when walking page tables

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Jia He commit 357ad203d45c0f9d76a8feadbd5a1c5d460c638b upstream. When walking the page tables at a given level, and if the start address for the range isn't aligned for that level, we propagate the misalignment on each iteration at that level. This results in

[PATCH 5.11 245/306] SUNRPC: Set memalloc_nofs_save() for sync tasks

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Benjamin Coddington [ Upstream commit f0940f4b3284a00f38a5d42e6067c2aaa20e1f2e ] We could recurse into NFS doing memory reclaim while sending a sync task, which might result in a deadlock. Set memalloc_nofs_save for sync task execution. Fixes: a1231fda7e94

[PATCH 5.10 279/290] KVM: arm64: Avoid corrupting vCPU context register in guest exit

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Will Deacon commit 31948332d5fa392ad933f4a6a10026850649ed76 upstream. Commit 7db21530479f ("KVM: arm64: Restore hyp when panicking in guest context") tracks the currently running vCPU, clearing the pointer to NULL on exit from a guest. Unfortunately, the use of

[PATCH 5.11 244/306] arm64/mm: Fix pfn_valid() for ZONE_DEVICE based memory

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Anshuman Khandual [ Upstream commit eeb0753ba27b26f609e61f9950b14f1b934fe429 ] pfn_valid() validates a pfn but basically it checks for a valid struct page backing for that pfn. It should always return positive for memory ranges backed with struct page mapping.

[PATCH 5.10 280/290] KVM: arm64: nvhe: Save the SPE context early

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Suzuki K Poulose commit b96b0c5de685df82019e16826a282d53d86d112c upstream. The nVHE KVM hyp drains and disables the SPE buffer, before entering the guest, as the EL1&0 translation regime is going to be loaded with that of the guest. But this operation is

[PATCH 5.11 233/306] 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 5.11 226/306] 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.10 210/290] usb: xhci: Fix ASMedia ASM1042A and ASM3242 DMA addressing

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Forest Crossman commit b71c669ad8390dd1c866298319ff89fe68b45653 upstream. I've confirmed that both the ASMedia ASM1042A and ASM3242 have the same problem as the ASM1142 and ASM2142/ASM3142, where they lose some of the upper bits of 64-bit DMA addresses. As with

[PATCH 5.10 253/290] perf/core: Flush PMU internal buffers for per-CPU events

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Kan Liang [ Upstream commit a5398bffc01fe044848c5024e5e867e407f239b8 ] Sometimes the PMU internal buffers have to be flushed for per-CPU events during a context switch, e.g., large PEBS. Otherwise, the perf tool may report samples in locations that do not belong

[PATCH 5.10 217/290] 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 208/290] usb: xhci: do not perform Soft Retry for some xHCI hosts

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Stanislaw Gruszka commit a4a251f8c23518899d2078c320cf9ce2fa459c9f upstream. On some systems rt2800usb and mt7601u devices are unable to operate since commit f8f80be501aa ("xhci: Use soft retry to recover faster from transaction errors") Seems that some xHCI

[PATCH 5.10 212/290] 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 234/306] 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.11 224/306] 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.10 252/290] arm64: mm: use a 48-bit ID map when possible on 52-bit VA builds

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Ard Biesheuvel [ Upstream commit 7ba8f2b2d652cd8d8a2ab61f4be66973e70f9f88 ] 52-bit VA kernels can run on hardware that is only 48-bit capable, but configure the ID map as 52-bit by default. This was not a problem until recently, because the special T0SZ value

[PATCH 5.10 250/290] nvme-fc: fix racing controller reset and create association

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: James Smart [ Upstream commit f20ef34d71abc1fc56b322aaa251f90f94320140 ] Recent patch to prevent calling __nvme_fc_abort_outstanding_ios in interrupt context results in a possible race condition. A controller reset results in errored io completions, which

[PATCH 5.11 242/306] cpufreq: qcom-hw: fix dereferencing freed memory data

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Shawn Guo [ Upstream commit 02fc409540303801994d076fcdb7064bd634dbf3 ] Commit 67fc209b527d ("cpufreq: qcom-hw: drop devm_xxx() calls from init/exit hooks") introduces an issue of dereferencing freed memory 'data'. Fix it. Fixes: 67fc209b527d ("cpufreq:

[PATCH 5.11 223/306] 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 229/306] 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.11 253/306] arm64: mm: use a 48-bit ID map when possible on 52-bit VA builds

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Ard Biesheuvel [ Upstream commit 7ba8f2b2d652cd8d8a2ab61f4be66973e70f9f88 ] 52-bit VA kernels can run on hardware that is only 48-bit capable, but configure the ID map as 52-bit by default. This was not a problem until recently, because the special T0SZ value

[PATCH 5.11 254/306] io_uring: perform IOPOLL reaping if canceler is thread itself

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Jens Axboe [ Upstream commit d052d1d685f5125249ab4ff887562c88ba959638 ] We bypass IOPOLL completion polling (and reaping) for the SQPOLL thread, but if it's the thread itself invoking cancelations, then we still need to perform it or no one will. Fixes:

[PATCH 5.10 214/290] 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 5.10 213/290] 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 5.11 227/306] 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 206/290] USB: usblp: fix a hang in poll() if disconnected

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Pete Zaitcev commit 9de2c43acf37a17dc4c69ff78bb099b80fb74325 upstream. Apparently an application that opens a device and calls select() on it, will hang if the decice is disconnected. It's a little surprising that we had this bug for 15 years, but apparently

[PATCH 5.10 216/290] 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.10 204/290] usb: dwc3: qcom: add ACPI device id for sc8180x

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Shawn Guo commit 1edbff9c80ed32071fffa7dbaaea507fdb21ff2d upstream. It enables USB Host support for sc8180x ACPI boot, both the standalone one and the one behind URS (USB Role Switch). And they share the the same dwc3_acpi_pdata with sdm845. Signed-off-by:

[PATCH 5.11 251/306] nvme-fc: fix racing controller reset and create association

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: James Smart [ Upstream commit f20ef34d71abc1fc56b322aaa251f90f94320140 ] Recent patch to prevent calling __nvme_fc_abort_outstanding_ios in interrupt context results in a possible race condition. A controller reset results in errored io completions, which

[PATCH 5.10 240/290] 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.10 189/290] s390/dasd: fix hanging DASD driver unbind

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Stefan Haberland commit 7d365bd0bff3c0310c39ebaffc9a8458e036d666 upstream. In case of an unbind of the DASD device driver the function dasd_generic_remove() is called which shuts down the device. Among others this functions removes the int_handler from the cdev.

[PATCH 5.11 225/306] 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.11 217/306] 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.10 202/290] usb: dwc3: qcom: Add missing DWC3 OF node refcount decrement

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Serge Semin commit 1cffb1c66499a9db9a735473778abf8427d16287 upstream. of_get_child_by_name() increments the reference counter of the OF node it managed to find. So after the code is done using the device node, the refcount must be decremented. Add missing

[PATCH 5.11 215/306] 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.11 209/306] 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 5.11 150/306] PCI/LINK: Remove bandwidth notification

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Bjorn Helgaas [ Upstream commit b4c7d2076b4e767dd2e075a2b3a9e57753fc67f5 ] The PCIe Bandwidth Change Notification feature logs messages when the link bandwidth changes. Some users have reported that these messages occur often enough to significantly reduce NVMe

[PATCH 5.11 137/306] spi: stm32: make spurious and overrun interrupts visible

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Alain Volmat [ Upstream commit c64e7efe46b7de21937ef4b3594d9b1fc74f07df ] We do not expect to receive spurious interrupts so rise a warning if it happens. RX overrun is an error condition that signals a corrupted RX stream both in dma and in irq modes. Report

[PATCH 5.4 072/168] 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 4.14 21/95] net: lapbether: Remove netif_start_queue / netif_stop_queue

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Xie He commit f7d9d4854519fdf4d45c70a4d953438cd88e7e58 upstream. For the devices in this driver, the default qdisc is "noqueue", because their "tx_queue_len" is 0. In function "__dev_queue_xmit" in "net/core/dev.c", devices with the "noqueue" qdisc are

[PATCH 4.19 030/120] 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.10 054/290] net: stmmac: Fix VLAN filter delete timeout issue in Intel mGBE SGMII

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Ong Boon Leong commit 9a7b3950c7e15968e23d83be215e95ccc7c92a53 upstream. For Intel mGbE controller, MAC VLAN filter delete operation will time-out if serdes power-down sequence happened first during driver remove() with below message. [82294.764958]

[PATCH 4.19 031/120] selftests: forwarding: Fix race condition in mirror installation

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Danielle Ratson commit edcbf5137f093b5502f5f6b97cce3cbadbde27aa upstream. When mirroring to a gretap in hardware the device expects to be programmed with the egress port and all the encapsulating headers. This requires the driver to resolve the path the packet

[PATCH 5.4 046/168] bnxt_en: reliably allocate IRQ table on reset to avoid crash

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Edwin Peer commit 20d7d1c5c9b11e9f538ed4a2289be106de970d3e upstream. The following trace excerpt corresponds with a NULL pointer dereference of 'bp->irq_tbl' in bnxt_setup_inta() on an Aarch64 system after many device resets: Unable to handle kernel NULL

[PATCH 5.11 065/306] net: stmmac: Fix VLAN filter delete timeout issue in Intel mGBE SGMII

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Ong Boon Leong commit 9a7b3950c7e15968e23d83be215e95ccc7c92a53 upstream. For Intel mGbE controller, MAC VLAN filter delete operation will time-out if serdes power-down sequence happened first during driver remove() with below message. [82294.764958]

[PATCH 5.11 291/306] x86/entry: Fix entry/exit mismatch on failed fast 32-bit syscalls

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Andy Lutomirski commit 5d5675df792ff67e74a500c4c94db0f99e6a10ef upstream. On a 32-bit fast syscall that fails to read its arguments from user memory, the kernel currently does syscall exit work but not syscall entry work. This confuses audit and ptrace. For

[PATCH 5.11 292/306] KVM: x86: Ensure deadline timer has truly expired before posting its IRQ

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Sean Christopherson commit beda430177f56656e7980dcce93456ffaa35676b upstream. When posting a deadline timer interrupt, open code the checks guarding __kvm_wait_lapic_expire() in order to skip the lapic_timer_int_injected() check in kvm_wait_lapic_expire(). The

[PATCH 5.10 274/290] x86/sev-es: Use __copy_from_user_inatomic()

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Joerg Roedel commit bffe30dd9f1f3b2608a87ac909a224d6be472485 upstream. The #VC handler must run in atomic context and cannot sleep. This is a problem when it tries to fetch instruction bytes from user-space via copy_from_user(). Introduce a

[PATCH 5.11 290/306] x86/sev-es: Use __copy_from_user_inatomic()

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Joerg Roedel commit bffe30dd9f1f3b2608a87ac909a224d6be472485 upstream. The #VC handler must run in atomic context and cannot sleep. This is a problem when it tries to fetch instruction bytes from user-space via copy_from_user(). Introduce a

[PATCH 5.11 288/306] x86/sev-es: Check regs->sp is trusted before adjusting #VC IST stack

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Joerg Roedel commit 545ac14c16b5dbd909d5a90ddf5b5a629a40fa94 upstream. The code in the NMI handler to adjust the #VC handler IST stack is needed in case an NMI hits when the #VC handler is still using its IST stack. But the check for this condition also needs

[PATCH 5.11 287/306] x86/sev-es: Introduce ip_within_syscall_gap() helper

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Joerg Roedel commit 78a81d88f60ba773cbe890205e1ee67f00502948 upstream. Introduce a helper to check whether an exception came from the syscall gap and use it in the SEV-ES code. Extend the check to also cover the compatibility SYSCALL entry path. Fixes:

[PATCH 5.10 275/290] x86/entry: Fix entry/exit mismatch on failed fast 32-bit syscalls

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Andy Lutomirski commit 5d5675df792ff67e74a500c4c94db0f99e6a10ef upstream. On a 32-bit fast syscall that fails to read its arguments from user memory, the kernel currently does syscall exit work but not syscall entry work. This confuses audit and ptrace. For

[PATCH 5.11 286/306] x86/unwind/orc: Disable KASAN checking in the ORC unwinder, part 2

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Josh Poimboeuf commit e504e74cc3a2c092b05577ce3e8e013fae7d94e6 upstream. KASAN reserves "redzone" areas between stack frames in order to detect stack overruns. A read or write to such an area triggers a KASAN "stack-out-of-bounds" BUG. Normally, the ORC

[PATCH 5.11 289/306] x86/sev-es: Correctly track IRQ states in runtime #VC handler

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Joerg Roedel commit 62441a1fb53263bda349b6e5997c3cc5c120d89e upstream. Call irqentry_nmi_enter()/irqentry_nmi_exit() in the #VC handler to correctly track the IRQ state during its execution. Fixes: 0786138c78e79 ("x86/sev-es: Add a Runtime #VC Exception

[PATCH 5.11 285/306] kasan: fix KASAN_STACK dependency for HW_TAGS

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Andrey Konovalov commit d9b571c885a8974fbb7d4ee639dbc643fd000f9e upstream. There's a runtime failure when running HW_TAGS-enabled kernel built with GCC on hardware that doesn't support MTE. GCC-built kernels always have CONFIG_KASAN_STACK enabled, even though

[PATCH 5.10 276/290] KVM: x86: Ensure deadline timer has truly expired before posting its IRQ

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Sean Christopherson commit beda430177f56656e7980dcce93456ffaa35676b upstream. When posting a deadline timer interrupt, open code the checks guarding __kvm_wait_lapic_expire() in order to skip the lapic_timer_int_injected() check in kvm_wait_lapic_expire(). The

[PATCH 5.11 284/306] kasan, mm: fix crash with HW_TAGS and DEBUG_PAGEALLOC

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Andrey Konovalov commit f9d79e8dce4077d3c6ab739c808169dfa99af9ef upstream. Currently, kasan_free_nondeferred_pages()->kasan_free_pages() is called after debug_pagealloc_unmap_pages(). This causes a crash when debug_pagealloc is enabled, as HW_TAGS KASAN can't

[PATCH 5.10 273/290] x86/sev-es: Correctly track IRQ states in runtime #VC handler

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Joerg Roedel commit 62441a1fb53263bda349b6e5997c3cc5c120d89e upstream. Call irqentry_nmi_enter()/irqentry_nmi_exit() in the #VC handler to correctly track the IRQ state during its execution. Fixes: 0786138c78e79 ("x86/sev-es: Add a Runtime #VC Exception

[PATCH 5.10 270/290] x86/sev-es: Introduce ip_within_syscall_gap() helper

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Joerg Roedel commit 78a81d88f60ba773cbe890205e1ee67f00502948 upstream. Introduce a helper to check whether an exception came from the syscall gap and use it in the SEV-ES code. Extend the check to also cover the compatibility SYSCALL entry path. Fixes:

[PATCH 5.10 268/290] 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 5.10 269/290] x86/unwind/orc: Disable KASAN checking in the ORC unwinder, part 2

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Josh Poimboeuf commit e504e74cc3a2c092b05577ce3e8e013fae7d94e6 upstream. KASAN reserves "redzone" areas between stack frames in order to detect stack overruns. A read or write to such an area triggers a KASAN "stack-out-of-bounds" BUG. Normally, the ORC

[PATCH 5.11 248/306] 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 5.10 232/290] 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.11 249/306] 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 247/306] NFS: Dont gratuitously clear the inode cache when lookup failed

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Trond Myklebust [ Upstream commit 47397915ede0192235474b145ebcd81b37b03624 ] The fact that the lookup revalidation failed, does not mean that the inode contents have changed. Fixes: 5ceb9d7fdaaf ("NFS: Refactor nfs_lookup_revalidate()") Signed-off-by: Trond

[PATCH 5.10 230/290] 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.10 225/290] 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 229/290] 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

  1   2   3   4   5   6   7   8   9   10   >