aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <[email protected]>2024-04-18 16:33:28 +0200
committerGreg Kroah-Hartman <[email protected]>2024-04-18 16:33:28 +0200
commit1607830dadeefc407e4956336d9fcd9e9defd810 (patch)
tree82607cc9b8edc44269100fb849e98417190d9459
parentc281d18dda402a2d180b921eebc7fe22b76699cf (diff)
Revert "usb: cdc-wdm: close race between read and workqueue"
This reverts commit 339f83612f3a569b194680768b22bf113c26a29d. It has been found to cause problems in a number of Chromebook devices, so revert the change until it can be brought back in a safe way. Link: https://lore.kernel.org/r/[email protected] Reported-by:: Aleksander Morgado <[email protected]> Fixes: 339f83612f3a ("usb: cdc-wdm: close race between read and workqueue") Cc: stable <[email protected]> Cc: Oliver Neukum <[email protected]> Cc: Bjørn Mork <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--drivers/usb/class/cdc-wdm.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c
index c8262e2f2917..c553decb5461 100644
--- a/drivers/usb/class/cdc-wdm.c
+++ b/drivers/usb/class/cdc-wdm.c
@@ -485,7 +485,6 @@ out_free_mem:
static int service_outstanding_interrupt(struct wdm_device *desc)
{
int rv = 0;
- int used;
/* submit read urb only if the device is waiting for it */
if (!desc->resp_count || !--desc->resp_count)
@@ -500,10 +499,7 @@ static int service_outstanding_interrupt(struct wdm_device *desc)
goto out;
}
- used = test_and_set_bit(WDM_RESPONDING, &desc->flags);
- if (used)
- goto out;
-
+ set_bit(WDM_RESPONDING, &desc->flags);
spin_unlock_irq(&desc->iuspin);
rv = usb_submit_urb(desc->response, GFP_KERNEL);
spin_lock_irq(&desc->iuspin);