On Tue, Apr 17, 2012 at 05:02:30PM +0300, Alexander Shishkin wrote: > Currently, on gadget removal path, dummy_pullup() gets called after > gadget's disconnect(). Now, dummy_pullup() decides that it needs to > disconnect again, resulting in a crash. IOW, rmmod g_zero will crash > with dummy_hcd. Isn't the fix then simply: diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c index a6dfd21..170cbe8 100644 --- a/drivers/usb/gadget/dummy_hcd.c +++ b/drivers/usb/gadget/dummy_hcd.c @@ -927,7 +927,6 @@ static int dummy_udc_stop(struct usb_gadget *g, dum->driver = NULL; - dummy_pullup(&dum->gadget, 0); return 0; } udc_stop() should not call pullup(). -- balbi
Attachment:
signature.asc
Description: Digital signature