From: Oliver Neukum Date: Sat, 27 Feb 2010 19:57:12 +0000 (+0100) Subject: usb: cdc-wdm: Fix deadlock between write and resume X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=338124c1f18c2c737656ac58735f040d90b23d8c;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git usb: cdc-wdm: Fix deadlock between write and resume The new runtime PM scheme allows resume() to have no locks. This fixes the deadlock. Signed-off-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c index b57490508860..189141ca4e05 100644 --- a/drivers/usb/class/cdc-wdm.c +++ b/drivers/usb/class/cdc-wdm.c @@ -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