> refcounting is based on the fact that the object is freed when the count > hits zero. It doesn't matter who drops the last reference, at that point > nobody is using it.
Didn't we just have a similar discussion with respect to usb_dec_dev_use(dev) One of the issues is that really only the hub driver is allowed to cause the use to go to zero ... and that may happen only when the device is being disconnected. It really _does_ matter who drops the last reference, since there are semantics which need to be strongly glued to that. Perhaps the usb_dev_put()/usb_dev_get() routines (name change?:) should invoke a destructor before the free, and that destructor would BUG() except during device disconnect. > It might even be that the HCD isnt the last to drop > the reference because you are holding a reference to dump the URB for debugging > later on. I'll just point out that if the HCD ever _were_ the last to drop such a reference, that'd be a major behavioral change in the usbcore framework. Today only device drivers free urbs. - Dave _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel