On Mon, Apr 25, 2005 at 02:39:55PM -0400, Alan Stern wrote: > On Mon, 25 Apr 2005, Roman Kagan wrote: > > Well for non-klist version the test !list_empty(&dev->driver_list) in > > usb_driver_release_interface() was a good enough guard against recursion > > into device_release_driver(), so I'm not sure your patch is needed. > > But it is needed for the klist version. I didn't send a patch for that > version because I don't have the -mm kernel source handy. The analogous > change to the code should work, however.
OK then a matching change to usb_driver_claim_interface would be needed too. > Probably this is something you've missed. Let's say a driver X bound to > device D is rmmod'ed at the same time that driver Y is insmod'ed. > [...] > device_bind_driver calls klist_add_tail for D. But D's > knode_driver is still on X's klist_devices! Yes the scenario was on the surface, I just thought that this last step, where knode is added to a list before being released from another, is excluded by the klist core. At any rate the driver can check for klist_node_attached(&dev->knode_bus) before claiming the device, and leave it alone if it's already attached to another driver. Roman. ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel