Re: patch usb-bus-mutex.patch added to gregkh-2.6 tree

Greg KH <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
On Tue, Apr 10, 2007 at 12:14:48PM -0400, Alan Stern wrote:
> 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).

Ok, thanks, I thought that might be the case, but wanted to be safe.
I'll just rip it all out instead.

> BTW, there are a couple of references to usb_bus_type.subsys in comments 
> in driver.c.  You might as well remove them too.

Ah, thanks, will do.

greg k-h

-------------------------------------------------------------------------
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.