Am Sonntag, 10. August 2003 21:39 schrieb Alan Stern:
> Oliver:
> 
> You've been doing a lot of auditing of the USB drivers.  Here's a 
> potential problem I've never had a chance to look for -- maybe you've run 
> across an occurrence.
> 
> The problem is that usb_unlink_urb() without the ASYNC flag set doesn't 
> guarantee that the URB will be idle when it returns.  It only guarantees 
> that the URB will be idle _if it returns with no error_.
> 
> If a driver synchronously unlinks an URB and then reuses it without 
> checking the return code from the unlink, there might be trouble.  
> (Unlinking and then freeing the URB would be fine, of couse.)
> 
> Have you seen any places where this is done?

No never saw it,

most drivers unlink only on disconnect. The obvious candidates
are only network drivers and storage. The network drivers unlink
asynchronously.

What concerns me is code like this:

        warn("%s: Tx timeout.", netdev->name);
        dev->tx_urb->transfer_flags |= URB_ASYNC_UNLINK;
        usb_unlink_urb(dev->tx_urb);
        dev->stats.tx_errors++;

What happens if another unlink is in progress?

        Regards
                Oliver



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to