Am Montag, 10. September 2001 22:36 schrieben Sie:
> On Fri, Sep 07, 2001 at 11:30:52PM +0200, Oliver Neukum wrote:
> > Am Freitag, 7. September 2001 23:16 schrieb David Brownell:
> > > > where is the incrementing to the module use counters for probe() done
> > > > ?
> > >
> > > I think I remember noticing it wasn't done:  lurking bug, worth a fix.
> > >
> > > It'd likely belong somewhere in the usb.c usb_find_interface_driver()
> > > code; that driver->serialize semaphore doesn't do enough.
> >
> > I thought so. Upon second thought I think disconnect() is vulnerable,
> > too. The fix involves adding a module field to struct usb_driver. A
> > "module : THIS_MODULE" should make any driver consisting of one module
> > safe. Usbserial needs further work.
> >
> > Do you like the included patch ?
>
> Wait, are you trying to protect the usbcore module or the individual
> driver modules here?

The individual drivers. How the usbcore is protected is a good question.
I'll investigate.

> If the driver modules, they should be protected by themselves (setting
> MOD_INC before doing anything that could sleep).

Why ? We protect them with a semaphore, why not against unload ?
Furthermore it is common code and in most cases done wrongly. For example 
almost all drivers fail to do this properly for disconnect().

        Regards
                Oliver

_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to