If I don't set the device pointer to NULL in the disconnect function, what
will I be pointing at?  Is that safe?

Matt Dharm

On Sun, 26 Mar 2000, Pavel Machek wrote:

> Hi!
> 
> > Interesting. Very interesting.
> > 
> > Well, clearly one thing I can do is try to place locks around everything
> > to eliminate this race condition.  But this raises two concerns to me:
> > 
> > (1) Lots of locks means poor performance
> > (2) Lots of drivers probably suffer from this same problem.  usb-storage
> > is probably just one of the few that does so many repeated transfers over
> > such a long period of time to make this visible.
> > 
> > It occurs to me that the best answer is probably to make it so that
> > usb_sndbulkpipe checks for a NULL device and make it so that
> > usb_bulk_msg() can also handle a NULL device.  Returning an error to
> > indicate "invalid device" would probably be the best way to go.
> 
> What about not setting pusb_dev to NULL in disconnect? Usb layer should
> handle that.
>                                                               Pavel
> 

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

A:  The most ironic oxymoron wins ...
DP: "Microsoft Works"
A:  Uh, okay, you win.
                                        -- A.J. & Dust Puppy
User Friendly, 1/18/1998


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

Reply via email to