mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 14:23:38 +00:00

* kernel: bump 5.10 to 5.10.65 Manually refreshed: generic/pending-5.10/800-bcma-get-SoC-device-struct-copy-its-DMA-params-to-th.patch bcm27xx/patches-5.10/950-0053-firmware-bcm2835-Support-ARCH_BCM270x.patch bcm27xx/patches-5.10/950-0087-firmware-raspberrypi-Add-backward-compatible-get_thr.patch Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com> * kernel: bump 5.10 to 5.10.66 No patches refreshed. Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com> * kernel: bump 5.10 to 5.10.67 Deleted (upstreamed): bcm27xx/patches-5.10/950-0312-vc4_hdmi-Set-HD_CTL_WHOLSMP-and-HD_CTL_CHALIGN_SET.patch Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com> * kernel: bump 5.10 to 5.10.68 Deleted (upstreamed): generic/backport-5.10/610-v5.13-02-netfilter-Fix-fall-through-warnings-for-Clang.patch generic/backport-5.10/792-v5.15-0001-net-dsa-b53-Fix-calculating-number-of-switch-ports.patch generic/backport-5.10/792-v5.15-0002-net-dsa-b53-Set-correct-number-of-ports-in-the-DSA-s.patch generic/backport-5.10/792-v5.15-0003-net-dsa-b53-Fix-IMP-port-setup-on-BCM5301x.patch generic/backport-5.10/840-0001-PCI-of-Don-t-fail-devm_pci_alloc_host_bridge-on-miss.patch generic/backport-5.10/840-0002-PCI-iproc-Fix-BCMA-probe-resource-handling.patch generic/pending-5.10/498-mtd-mtdconcat-select-readwrite-function.patch Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com> * kernel: bump 5.10 to 5.10.69 Patches automatically refreshed. Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com> * kernel: bump 5.10 to 5.10.70 Deleted (upstreamed): bcm53xx/patches-5.10/181-Revert-USB-bcma-Add-a-check-for-devm_gpiod_get.patch Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com> Co-authored-by: Rui Salvaterra <rsalvaterra@gmail.com>
44 lines
1.5 KiB
Diff
44 lines
1.5 KiB
Diff
From 9d51ba9909129465493d56a7134ce4220d2e69e9 Mon Sep 17 00:00:00 2001
|
|
From: Jonathan Bell <jonathan@raspberrypi.com>
|
|
Date: Mon, 16 Aug 2021 14:43:06 +0100
|
|
Subject: [PATCH] xhci: guard accesses to ep_state in
|
|
xhci_endpoint_reset()
|
|
|
|
See https://github.com/raspberrypi/linux/issues/3981
|
|
|
|
Two read-modify-write cycles on ep->ep_state are not guarded by
|
|
xhci->lock. Fix these.
|
|
|
|
Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
|
---
|
|
drivers/usb/host/xhci.c | 5 +++++
|
|
1 file changed, 5 insertions(+)
|
|
|
|
--- a/drivers/usb/host/xhci.c
|
|
+++ b/drivers/usb/host/xhci.c
|
|
@@ -3270,10 +3270,13 @@ static void xhci_endpoint_reset(struct u
|
|
return;
|
|
|
|
/* Bail out if toggle is already being cleared by a endpoint reset */
|
|
+ spin_lock_irqsave(&xhci->lock, flags);
|
|
if (ep->ep_state & EP_HARD_CLEAR_TOGGLE) {
|
|
ep->ep_state &= ~EP_HARD_CLEAR_TOGGLE;
|
|
+ spin_unlock_irqrestore(&xhci->lock, flags);
|
|
return;
|
|
}
|
|
+ spin_unlock_irqrestore(&xhci->lock, flags);
|
|
/* Only interrupt and bulk ep's use data toggle, USB2 spec 5.5.4-> */
|
|
if (usb_endpoint_xfer_control(&host_ep->desc) ||
|
|
usb_endpoint_xfer_isoc(&host_ep->desc))
|
|
@@ -3359,8 +3362,10 @@ static void xhci_endpoint_reset(struct u
|
|
xhci_free_command(xhci, cfg_cmd);
|
|
cleanup:
|
|
xhci_free_command(xhci, stop_cmd);
|
|
+ spin_lock_irqsave(&xhci->lock, flags);
|
|
if (ep->ep_state & EP_SOFT_CLEAR_TOGGLE)
|
|
ep->ep_state &= ~EP_SOFT_CLEAR_TOGGLE;
|
|
+ spin_unlock_irqrestore(&xhci->lock, flags);
|
|
}
|
|
|
|
static int xhci_check_streams_endpoint(struct xhci_hcd *xhci,
|