On Thu, Sep 18, 2003 at 06:24:42PM -0700, David Brownell wrote:
Since usbcore is still keeping the config[i]->interface[j] reference, dropping the refcount then would lead to oopsing later when it got re-used. I got tired of oopsing. :)
Ok, doing that for the interfaces is fine, it makes sense, you can call device_add() after calling device_del() just fine.
Good, that one's essential!
But it's the change to the main struct usb_device logic that calls device_del() that I'm questioning. I don't see the final put that is needed there. Why did you change that?
Because that usb_disconnect() logic would then be decrementing twice when eliminating just one pointer: it would device_unregister() to drop the first one, then usb_put_dev() to do the second. There's an extra refcount being gotten somewhere, clearly.
However, that one's less important, and it might be safer to address that issue in a separate patch.
- Dave
thanks,
greg k-h
------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel