On Sat, Feb 02, 2002 at 11:47:02PM +0100, Oliver Neukum wrote:
> Hi,
> 
> usbnet is allocating an URB in usbnet_start_xmit().
> usbnet_start_xmit() is called with a spinlock held.
> Thus the usbcore will call kmalloc() with GFP_KERNEL
> and and a spinlock held. Deadlock may result.
> I see no solution but to alter the API by adding a
> gfp parameter to usb_alloc_urb.
> 
> Greg, please decide.

For this case, I'd argue that a driver shouldn't be allocating a urb
within an interrupt at all :)

In just glancing at usbnet.c, can't you allocate the start urb at probe
time, to have it ready when it is needed?

I don't think that we should change the API for this single driver,
unless it is _really_ needed.

Now the comments about the HCD drivers needing to know about this, and
their API being changed, I understand.  I'd be glad to accept such a
patch (I am even willing to fix up all of the drivers in the tree, if
someone wants to just patch the HCD drivers, and a single device driver
to test things with.)

And no, I don't mind breaking API compatibility between 2.4 and 2.5 trees
to fix such a real problem.  After 2.5 is changed, and problems are
shaken out, we can always backport to 2.4, if necessary.

thanks,

greg k-h

_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to