Response time isn't the issue.  The issue is a race condition on using a
local pointer variable.

Most drivers have a local pointer that points to the usb device structure.
As far as I know (and realize that this is based on some comments from
Randy et al), there are drivers out there (other than usb-storage) which
do not do locking around this pointer.  So a race exists between the
_disconnect() function and parts of the code that use this pointer --
realize that if the _disconnect() function is called and returns, that old
pointer value is now invalid.  If it's allready been copied (as in to fill
in an URB which has yet to be submitted), problems will arise.

Matt Dharm

On Thu, 30 Mar 2000, Greg KH wrote:

> On Wed, Mar 29, 2000 at 01:29:52PM -0800, Matthew Dharm wrote:
> > usb-storage is only the tip of the iceberg.  It would appear that very few
> > drivers actually lock around access to the local data pointer.
> > usb-storage is just the easiest to make it oops in this condition.
> > 
> > Really, tho, the problem is more pathological than that.  Suppose that the
> > pointer has allready been copied when the _disconnect() happens.  Even
> > with your patch, we're going to have some very undefined results.
> > 
> > The right answer is to identify all the trouble areas in all the drivers
> > and fix them.
> > 
> 
> What are the main trouble areas? I have been following this for a while,
> and haven't seen where other drivers could have problems (the response
> time is much shorter than mass-storage for most devices).
> 
> Any hints, or problem cases would be appreciated.
> 
> Thanks,
> 
> greg k-h
> [EMAIL PROTECTED]
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-- 
Matthew Dharm                              Home: [EMAIL PROTECTED] 
Engineer, Qualcomm, Inc.                         Work: [EMAIL PROTECTED]

E:  You run this ship with Windows?!  YOU IDIOT!
L:  Give me a break, it came bundled with the computer!
                                        -- ESR and Lan Solaris
User Friendly, 12/8/1998


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to