Khubd calls disconnect() after driver module unloaded

Alan Stern <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
[Moved to new thread and different mailing list]

On Mon, 12 Nov 2007, David Woodhouse wrote:

> Speaking of races with khubd.... I have observed it calling
> ->disconnect() for a device after the driver module has already been
> unloaded. Any thoughts on the following would be appreciated:
> http://dev.laptop.org/git?p=olpc-2.6;a=commitdiff;h=65f7bec3860eb3192cd37e4d449ae608add4d50a

The comments in that patch don't provide enough details to tell what's
going wrong.  The exit routine calls usb_deregister(), but then some
time later khubd calls the disconnect method?

That's not supposed to happen.  Instead, the disconnect method should
be called by driver_detach() from within the usb_deregister() call
stack, not by khubd at all.  If that's not happening then something is
wrong with the driver core.

Is there some sort of race going on, where both the driver and the 
device get unregistered at about the same time?  The device lock is 
supposed to serialize this so that no matter which one comes first, the 
end result is correct.

Alan Stern


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.