Skip to content

Commit

Permalink
usb: cdc-wdm: Fix deadlock between write and resume
Browse files Browse the repository at this point in the history
The new runtime PM scheme allows resume() to have no locks.
This fixes the deadlock.

Signed-off-by: Oliver Neukum <neukum@b1-systems.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Oliver Neukum authored and Greg Kroah-Hartman committed Mar 19, 2010
1 parent d93d16e commit 338124c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/usb/class/cdc-wdm.c
Original file line number Diff line number Diff line change
Expand Up @@ -839,10 +839,10 @@ static int wdm_resume(struct usb_interface *intf)
int rv;

dev_dbg(&desc->intf->dev, "wdm%d_resume\n", intf->minor);
mutex_lock(&desc->lock);

clear_bit(WDM_SUSPENDING, &desc->flags);
rv = recover_from_urb_loss(desc);
mutex_unlock(&desc->lock);

return rv;
}
#endif
Expand Down

0 comments on commit 338124c

Please sign in to comment.