Am Dienstag, 9. Dezember 2003 22:01 schrieb David Brownell:
> Oliver Neukum wrote:
> >>Comments?  That description seems bigger than the patch!
> > 
> > 
> > Splendid!
> > 
> > Just one issue. Giving up an interface just needs a readlock,
> > not a writelock.
> 
> Could you elaborate a bit?  I don't think I noticed any
> code getting readlocks on the bus rwsem on such paths.
> 
> Isn't giving up an interface still _changing_ a binding?
> Usually readlocks imply read-only data.

It is in the comments.
Strictly speaking giving up a claim on an interface can
race only with probing or driver unload. There's nothing
wrong with two drivers doing usb_driver_release_interface()
concurrently. They own the interfaces.
As probe() and unloading will take writelocks, taking a readlock
here is enough. It doesn't matter in practice, but still I cannot
help noticing that in a very strict sense a comment could be objected
to. ;-)

        Regards
                Oliver



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to