On Thursday 20 February 2003 02:13, Oliver Neukum wrote:
> Am Donnerstag, 20. Februar 2003 01:47 schrieb Greg KH:
> > On Thu, Feb 20, 2003 at 01:45:09AM +0100, Oliver Neukum wrote:
> > > Besides, what are you to do if incrementing a usage count in
> > > usb_submit_urb() fails ? By definition you cannot return to the driver.
> >
> > Huh?  usb_submit_urb() can fail today any number of different ways.
> > -ENODEV would work just fine if we can't increment the module reference
> > count of a urb.
>
> You'd return to a driver that is undergoing unload ?
> You are potentially doing a return into never never land.

Huh?  usb_submit_urb is being called from a routine (call it X) in the driver.
So someone (Q) called X.  If the driver can unload while X is running, it means
that Q didn't use try_module_get before jumping to the driver code.  That
means Q stuffed up.  It is not usb_submit_urb's problem.  If the call to
usb_submit_urb did not exist, likely Q would die while in X anyway, as the
driver is unloaded underneath it.  Check out the third question in

www.kernel.org/pub/linux/kernel/people/rusty/modules/FAQ

Or did I misunderstand what you are talking about?

Duncan.


-------------------------------------------------------
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

Reply via email to