Re: patch usb-bus-mutex.patch added to gregkh-2.6 tree
Alan Stern <[email protected]>
| Newsgroups | gmane.linux.usb.devel |
|---|---|
| Message-ID | <[email protected]> |
On Mon, 9 Apr 2007 [email protected] wrote: > > This is a note to let you know that I've just added the patch titled > > Subject: USB: remove use of the bus rwsem, as it doesn't really protect anything. > > to my gregkh-2.6 tree. Its filename is > > usb-bus-mutex.patch > > This tree can be found at > http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/ > > > From foo@baz Tue Apr 9 12:12:43 2002 > Date: Mon, 9 Apr 2007 11:52:31 -0400 (EDT) > To: Greg KH <[email protected]> > From: Greg Kroah-Hartman <[email protected]> > Subject: USB: remove use of the bus rwsem, as it doesn't really protect anything. > > The driver core stopped using the rwsem a long time ago, yet the USB > core still grabbed the lock, thinking it protected something. As a lock > is really needed for these instances, I've replaced it with a local > mutex to protect the bus, but odds are there is still a code path that > needs to have this lock added to it to properly protect things. Actually I don't think the new mutex is needed for protecting anything. All the areas covered by your patch are already protected by the device lock (changes to bindings, interfaces, or configurations, addition or removal of children) or the bus_list_lock (addition or removal of root hubs). BTW, there are a couple of references to usb_bus_type.subsys in comments in driver.c. You might as well remove them too. Alan Stern ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel