> > In static void rtl8150_tx_timeout(struct net_device *netdev)
> > you set the ASYNC_UNLINK flag. If a disconnect happens
> > in the window between this and the unlink finishing you
> > leave disconnect() with a live and freed urb.
> 
> I was thinking usb_unlink_urb() takes care to kill it so it is harmless
> to free it afterwards.  Isn't this true?

Requesting an async unlink means that the URB will still
be busy until the "it's unlinked" callback completes.  The
caller of usb_unlink_urb() can't free the URB except in
the case of a _synchronous_ unlink.

Some of the HCDs have been known to reference URBs
after they issue the "it's unlinked now" callback, which is
bogus (if it's unlinked, the _driver_ owns the URB!) but for
now you have to live with it.  I've freed them in a tasklet; I
think only "usb-uhci" was particuarly problematic.  Then
the tasklet would wake up disconnect() when it was done.

- Dave




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

Sponsored by http://www.ThinkGeek.com/

Reply via email to