On Llu, 2003-06-23 at 19:11, Tuukka Toivonen wrote: > Let's suppose user calls open() on my device. The first line of open() > call could lock semaphores, increase reference counts, whatever, but all is > useless if usb_disconnect() happens _after_ open() system call but _before_ > the first line of the open()-function has been executed.
Firstly you are smart enough to notice the open thing. Thats a good sign not a bad one 8) For module unload you can set owner: THIS_MODULE and the kernel bumps your module count > So I can not think of any way to fix it... usb_disconnect() can not trust > that the open() call has had time to do any locking, or anything. How can > it know whether resources may be freed? Because the open handler can do take a lock shared with your disconnect check the "is it still here" static info realise it isnt abort [or realise it is and ref count it so that the unplug wont free it just yet] ------------------------------------------------------- This SF.Net email is sponsored by: INetU Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel