mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 22:02:02 +00:00
Revert "usb: cdc-wdm: close race between read and workqueue"
commit1607830dad
upstream. This reverts commit339f83612f
. 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:339f83612f
("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>
This commit is contained in:
parent
d841a93b5a
commit
2ff436b639
1 changed files with 1 additions and 5 deletions
|
@ -485,7 +485,6 @@ static ssize_t wdm_write
|
||||||
static int service_outstanding_interrupt(struct wdm_device *desc)
|
static int service_outstanding_interrupt(struct wdm_device *desc)
|
||||||
{
|
{
|
||||||
int rv = 0;
|
int rv = 0;
|
||||||
int used;
|
|
||||||
|
|
||||||
/* submit read urb only if the device is waiting for it */
|
/* submit read urb only if the device is waiting for it */
|
||||||
if (!desc->resp_count || !--desc->resp_count)
|
if (!desc->resp_count || !--desc->resp_count)
|
||||||
|
@ -500,10 +499,7 @@ static int service_outstanding_interrupt(struct wdm_device *desc)
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
used = test_and_set_bit(WDM_RESPONDING, &desc->flags);
|
set_bit(WDM_RESPONDING, &desc->flags);
|
||||||
if (used)
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
spin_unlock_irq(&desc->iuspin);
|
spin_unlock_irq(&desc->iuspin);
|
||||||
rv = usb_submit_urb(desc->response, GFP_KERNEL);
|
rv = usb_submit_urb(desc->response, GFP_KERNEL);
|
||||||
spin_lock_irq(&desc->iuspin);
|
spin_lock_irq(&desc->iuspin);
|
||||||
|
|
Loading…
Reference in a new issue