On Thu, Feb 20, 2003 at 02:46:51AM +0100, Oliver Neukum wrote: > > What? If a driver is undergoing unload, then any kind of return from > > usb_submit_urb() (error or not) will cause an oops. > > Exactly. You are checking for an error that you can't handle. > What would usb_submit_urb() do if increasing the usage count > fails?
Return an error. But remember, we aren't trying to protect the call to usb_submit_urb() at that point in time, it better already be protected (Like Duncan pointed out). We're trying to protect the module later, when the close() call has decremented the module count, yet urbs are still in flight through the usb core (due to the driver not knowing about them anymore, like in the visor driver.) That's why we need this reference count. thanks, greg k-h ------------------------------------------------------- This SF.net email is sponsored by: SlickEdit Inc. Develop an edge. The most comprehensive and flexible code editor you can use. Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial. www.slickedit.com/sourceforge _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel