On Tuesday 19 October 2004 10:35 am, Alan Stern wrote: > On Mon, 18 Oct 2004, Dmitry Torokhov wrote: > > > > I don't know about /dev/input/mouse1. But the oops isn't a bug... it's a > > > weakness in the way Linux implements loadable kernel modules. > > > > > > > Ugh, it is not module implementation weakness, it looks like refcounting > > problem in USB. > > Could you explain that more fully? Are you talking about a particular > refcounting problem in the usbhid subsystem or do you mean a more > pervasive problem in the whole USB system? And why do you say it's a > refcounting problem in the first place? >
I am not sure it it is HID-specific problem or a wider one but it looks like usbhid can be unloaded while there are references to objects produced by this module - hence refcounting problem. You either have to disallow unloading while there are references (but this path leads to potential deadlocks) or have a generic release function registered with the core that pretty much always stays there. Then you can free all device-specific data at unload time and mark the object as a zombie so anything that tries to touch it releases it quickly and then the core routine will free skeleton data at last. The patch that I sent should hide the problem somewhat as at disconnect time it will unregister corresponsing class devices thus dropping the reference that was pinning usbhid structures. -- Dmitry ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel