On Tue, May 22, 2007 at 11:46:41AM -0400, Alan Stern wrote:
> This patch (as908) adds central protection in usbcore for the
> prototypical race between opening and unregistering a char device.
> The spinlock used to protect the minor-numbers array is replaced with
> an rwsem, which can remain locked across a call to a driver's open()
> method.  This guarantees that open() and deregister() will be mutually
> exclusive.

Note that you missed some places in the sysvga driver, which I tried to
fix up.  You might want to check that I did this properly, just removing
the lock felt "wrong" somehow :)

Anyway, thanks a lot for doing this, it makes writing drivers much
easier.

Although I really hate rw locks, I'll let it go for now, we can easily
change it to a "normal" mutex in the future...

thanks,

greg k-h

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to