Skip to content

Commit 1607830

Browse files
committed
Revert "usb: cdc-wdm: close race between read and workqueue"
This reverts commit 339f836. 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/385a3519-b45d-48c5-a6fd-a3fdb6bec92f@chromium.org Reported-by:: Aleksander Morgado <aleksandermj@chromium.org> Fixes: 339f836 ("usb: cdc-wdm: close race between read and workqueue") Cc: stable <stable@kernel.org> Cc: Oliver Neukum <oneukum@suse.com> Cc: Bjørn Mork <bjorn@mork.no> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent c281d18 commit 1607830

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

drivers/usb/class/cdc-wdm.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,6 @@ static ssize_t wdm_write
485485
static int service_outstanding_interrupt(struct wdm_device *desc)
486486
{
487487
int rv = 0;
488-
int used;
489488

490489
/* submit read urb only if the device is waiting for it */
491490
if (!desc->resp_count || !--desc->resp_count)
@@ -500,10 +499,7 @@ static int service_outstanding_interrupt(struct wdm_device *desc)
500499
goto out;
501500
}
502501

503-
used = test_and_set_bit(WDM_RESPONDING, &desc->flags);
504-
if (used)
505-
goto out;
506-
502+
set_bit(WDM_RESPONDING, &desc->flags);
507503
spin_unlock_irq(&desc->iuspin);
508504
rv = usb_submit_urb(desc->response, GFP_KERNEL);
509505
spin_lock_irq(&desc->iuspin);

0 commit comments

Comments
 (0)