> It also doesn't help in cases like usbdevfs. What if it wants to use the > device structure for some reason, like say a user reading > /proc/bus/usb/devices. It should increment the reference count, do it's > stuff and then decrement it. But it doesn't have a deallocate like call. > As a result, there's a race there.
Not so. Like all USB device drivers, usbfs has disconnect(). And yes, there _were_ some races there, which now seem to have been fixed. (The original code basically did nothing.) Those races were finally tracked down through use of some refcount-related BUG() calls ... like other drivers' disconnect() bugs also triggered such calls. Took way too many months to track them down since they only fired in some configurations. Moving the BUG() calls to where UHCI could trigger them too helped to quickly confirm the problem and sanity check the fix. - Dave _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
