Commit a6df4e9c authored by Duncan Sands's avatar Duncan Sands Committed by Greg Kroah-Hartman

[PATCH] USB devio.c: deadlock fix

proc_resetdevice is called with dev->serialize held.
usb_reset_device takes dev->serialize and then calls
__usb_reset_device.  To avoid deadlock, proc_resetdevice
should call __usb_reset_device directly.
Signed-off-by: default avatarDuncan Sands <baldrick@free.fr>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 5bdcd0d5
......@@ -719,7 +719,7 @@ static int proc_connectinfo(struct dev_state *ps, void __user *arg)
static int proc_resetdevice(struct dev_state *ps)
{
return usb_reset_device(ps->dev);
return __usb_reset_device(ps->dev);
}
......
......@@ -334,6 +334,7 @@ extern void usb_put_dev(struct usb_device *dev);
/* mostly for devices emulating SCSI over USB */
extern int usb_reset_device(struct usb_device *dev);
extern int __usb_reset_device(struct usb_device *dev);
extern struct usb_device *usb_find_device(u16 vendor_id, u16 product_id);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment