Alan Stern wrote:

The proper fix is to change releaseintf() -- and maybe some other routines
in the usbdevfs code as well -- to use ifnum_to_if() for mapping interface numbers to interfaces. It also won't hurt to add considerably more locking code (dev->serialize).

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.)

But yes, ifnum_to_if() is needed in devio.c in several places.

- Dave





-------------------------------------------------------
This SF.net email is sponsored by OSDN developer relations
Here's your chance to show off your extensive product knowledge
We want to know what you know. Tell us and you have a chance to win $100
http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to