On Tuesday 12 November 2002 20:26, David Brownell wrote:
> >>I think it's a driver bug (usbfs) that it released any
> >>interface with an urb still pending.
> >
> > Hi Dave, thanks for reading my emails!  There seem to be
> > multiple bugs:
> > (1) releasing an interface but not cancelling pending urbs.
>
> Yes.  Are you going to try to develop a patch for "usbfs"
> to resolve that bug?

Yes, I will do it.  I expect to have finished next week sometime.
The speedtouch people may not be happy though - at first glance
it looks like the "monitor the ADSL line" functionality relies on having
an urb pending without holding the interface.

> > (2) devio.c has no way of knowing that a device has been
> > removed (unless it got lucky and somebody claimed an
> > interface on the device), so will still submit urbs etc to it
> > [I didn't test this but I plan to].
>
> The "usbfs" code is supposed to handle that automatically,
> so that even if you've opened the file descriptor to that
> device's /proc/bus/usb/BBB/DDD device you can't do I/O on it.
> If there's a bug there, it needs fixing.

This is in inode.c, right?  OK, I will try to break it.

> >>I agree that it'd be better if usbcore guarded against the
> >>inevitable driver bugs, but that seems like 2.5 material
> >>due to the kind of changes needed.- Dave
> >
> > I think this is a bug in the core:
> > (3) urbs are not being cancelled on hub (device?) removal.
>
> I agree that should get fixed in 2.5, but it'd be too invasive
> to touch in 2.4 kernels.  The reason I want to see it happen
> is to defend better against buggy device drivers, and to make
> sure that devices shut down correctly.  (I've written about
> the two changes needed to make that happen elsewhere.)

OK.

> > After all, suppose I do the following:
> >
> > (a) I submit an interrupt urb to my modem.  This urb
> > completes when the state of the telephone line changes
> > (= usually never).
> > (b) I remove the hub driver.  The urb has not been unlinked.
> > (c) I unplug the telephone line from my modem.  The urb
> > completes.  But the hub driver has gone!
>
> Sorry, you can't remove a "hub driver" without removing
> the usbcore module, at which point _everything_ shuts down.

Ah ha!  I just checked - you are right (surprise!).  That explains why
I wasn't able to crash the system this way (I tried that too).

Duncan.


-------------------------------------------------------
This sf.net email is sponsored by: Are you worried about 
your web server security? Click here for a FREE Thawte 
Apache SSL Guide and answer your Apache SSL security 
needs: http://www.gothawte.com/rd523.html
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to