Am Mittwoch, 16. Juli 2003 22:07 schrieb Alan Stern:
> Oliver:
> 
> Along with all these races between probe and open that you've been fixing 
> recently, have you considered the race between disconnect and open?  I 
> added code to handle that in usb-skeleton.c a while ago, but I didn't look 
> at any of the other drivers.
> 
> It's a more difficult race to handle; just re-arranging the code won't
> work.  And you can't use a device-specific mutex, because at the crucial
> point during the call to open() you don't even know the address of the
> per-device private data.  There has to be a static driver-wide mutex, like
> disconnect_sem in usb-skeleton.c.

Right. And such a mutex could be used for open as well. In fact the scanner
driver does so. I'll look for such races as well before 2.60-final, have no
fear ;-)
I already had looked for the disconnect/open race some time ago, I'll do
so again. But that there might be a race between open and probe had not
been one of my priorities, so I am looking for it first.

Also, races with disconnect are not confined to open.
Then there are a couple of drivers who can be killed by ENOMEM in the
wrong moment. And EPIPE is often not handled.

It's cleanup time now :-)

        Regards
                Oliver



-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to