On Thu, Apr 28, 2005 at 02:36:39PM -0400, Alan Stern wrote:
> Here is a fix for driver_detach().  It's a little ugly because it avoids
> using the klist iterator, but there's no way around it -- the iterator
> simply can't be made to work here.  Not only does it prevent
> device_release_driver() from calling klist_remove(), but also it prevents
> doing get_device() while holding the klist spinlock.

I was about to cook up something very much like this :)

> With this patch in place, the code in usb_driver_release_interface() 
> doesn't really need to be changed.

Well, except for the inversion of the test, as given in my original
post.

> However I think it should be.  As it 
> is now, it relies on internal knowledge of how the driver-model core 
> works,

Agreed.  IMHO if the driver model strives to take care of everything on
caller's behalf, it also has to gracefully handle recursive calls of one
of its exported interfaces, device_release_driver().

Cheers,
  Roman.


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to