ChangeSet 1.1850, 2004/06/07 14:21:48-07:00, baldrick@free.fr [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: Duncan Sands Signed-off-by: Greg Kroah-Hartman drivers/usb/core/devio.c | 2 +- include/linux/usb.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff -Nru a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c --- a/drivers/usb/core/devio.c Mon Jun 7 14:42:04 2004 +++ b/drivers/usb/core/devio.c Mon Jun 7 14:42:04 2004 @@ -719,7 +719,7 @@ static int proc_resetdevice(struct dev_state *ps) { - return usb_reset_device(ps->dev); + return __usb_reset_device(ps->dev); } diff -Nru a/include/linux/usb.h b/include/linux/usb.h --- a/include/linux/usb.h Mon Jun 7 14:42:04 2004 +++ b/include/linux/usb.h Mon Jun 7 14:42:04 2004 @@ -334,6 +334,7 @@ /* 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);