On Wed, Dec 10, 2003 at 05:02:16PM +0100, Duncan Sands wrote:
> > That's what my proposal 1 paragraph up would do.  If I get the chance
> > this afternoon, I'll try to implement it if no one beats me to it...
> 
> Hi Greg, so this means that rmmod will sleep in an unkillable state until
> all references are dropped?

Yes, that is what would happen.

Now you could get into a deadlock by trying something pathilogical like:
        rmmod usb-hcd < /sys/devices/pci0000:00/0000:00:1d.7/usb1/idVendor

but hey, if you do that, you deserve the deadlock :)

(and yes, I know you can do this for network devices, but they have
their own thread/timer/something to prevent this deadlock from
happening...)

> I don't know if you've been following this thread or not, but the oops
> occurred when I modified usbfs to hold a reference to the usb_device
> until no-one was using a given usbfs file.

That's a good thing to do.  It should work.

> I guess this means that I should change my patch so that the reference
> to the usb_device is dropped as soon as possible, right?

No, the bug should be fixed.  I've seen this bug happen if someone has a
usb-serial device open and then unload the host controller driver.  In
fact, I think there's a bugzilla entry just for that...

Yeah, here it is:
        http://bugme.osdl.org/show_bug.cgi?id=1191

The very same oops you are seeing.

So no, it's not your fault.  We need to fix the real problem.

> Thanks for looking into this,

No problem, thanks for reminding me about this.

thanks,

greg k-h


-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to