This
http://linux.bkbits.net:8080/linux-2.4/cset%40412c6c71gH2KqyBakAeQE-CJpIK3hA?nav=index.html|[EMAIL PROTECTED]
patch in 2.4.28 breaks some usb devices that use concurrent access from different processes (like modem_run from speedtouch package but I have heard this is not the only one).


The problem is that the patch protects dev->descriptor and dev->config[] from simultaneous access in usb_dump_* (readonly access) and usb ioctls.
This is fine by me.


But this patch has also a big and probably unwanted side effect of serialising all ioctls and this breaks software that worked in 2.4.27 (like, one process does continuous reads via submitting and reaping URB-s and blocks on reaping them and another process does control messages).

So either the exclusive access needs to be backed out (I don't see how it can affect any drivers in 2.4 but this is my first look at the USB code) or modified so that it does not serialize ioctls.

Sounds like rwlock to me (any number of ioctls or exactly one usb_dump_* form /proc code) but this makes me suspicious whether the lock is needed at all since our "writer" is actually only a reader.

Since dev->devsem is already a rwlock, maybe the /proc code should be just another reader?

--
Meelis Roos (not subscribed to linux-usb-devel)


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to