Am Samstag, 11. Januar 2003 00:02 schrieb Greg KH: > On Fri, Jan 10, 2003 at 11:10:58PM +0100, Oliver Neukum wrote: > > That are good, or bad depending on viewpoint. > > IIRC we had this discussion already, possibly several times. Has the > > general consensus changed ? It seems that the old objections about > > freeing the URB from the completion handler are no longer valid, due to > > reference counting. IMO the completion handler should be waited for. > > No, it does not need to be waited for, as the host controller still has > a reference on the urb during that time, so the last person who cals > usb_free_urb() will really release the memory. > > This was done to help solve all of these kinds of problems :)
And it helps, but does not solve the problem. An URB is rarely, if ever, the only data structure. If you'd care to look at the code Duncan has found you'll see that the URB itself is safe, but struct async is not. Unfortunately the problem arises ever for data structures that cannot be refcounted, buffers that is. Secondly there's the resubmission from completion handler issue. I can easily list half a dozen drivers which have a race condition like this. > But the one whole is that the driver could be unloaded before the > completion handler is run, but we'll just not worry about that issue > anymore due to the depreciation of unloading modules... That is a cop out and you know it :-) Regards Oliver ------------------------------------------------------- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel