On Mon, 20 Oct 2003, David Brownell wrote:

> Actually if you look around, you'll notice usbcore uses about four
> different locks (including dev->serialize) to protect critical
> sections against changes to device binding ... but the only lock
> that's _correct_ to use is usb_bus_type.subsys.rwsem though!
> 
> (Though there's at least one place that also needs to use
> dev->serialize to also protect against _config changes_ too.)

As I see it, we've got a bunch of things that need locking protection, 
including:

        1. connect and disconnect events (device creation and deletion
                and also address-0 handling);
        2. driver probe() and disconnect() calls, also binding and 
                unbinding events;
        3. configuration and related device state changes.

Is it now generally accepted that usb_bus_type.subsys.rwsem is the correct 
lock for 1 and 2?  Likewise, is it accepted that dev->serialize is the 
correct lock for 3?

Alan Stern



-------------------------------------------------------
This SF.net email sponsored by: Enterprise Linux Forum Conference & Expo
The Event For Linux Datacenter Solutions & Strategies in The Enterprise 
Linux in the Boardroom; in the Front Office; & in the Server Room 
http://www.enterpriselinuxforum.com
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to