<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/usb/core, branch linux-2.6.18.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-2.6.18.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-2.6.18.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2006-11-04T01:33:50+00:00</updated>
<entry>
<title>[PATCH] usbfs: private mutex for open, release, and remove</title>
<updated>2006-11-04T01:33:50+00:00</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2006-07-02T02:05:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=108d51a5710a51ed46353655efc7d165b4c57b60'/>
<id>urn:sha1:108d51a5710a51ed46353655efc7d165b4c57b60</id>
<content type='text'>
The usbfs code doesn't provide sufficient mutual exclusion among open,
release, and remove.  Release vs. remove is okay because they both
acquire the device lock, but open is not exclusive with either one.  All
three routines modify the udev-&gt;filelist linked list, so they must not
run concurrently.

Apparently someone gave this a minimum amount of thought in the past by
explicitly acquiring the BKL at the start of the usbdev_open routine.
Oddly enough, there's a comment pointing out that locking is unnecessary
because chrdev_open already has acquired the BKL.

But this ignores the point that the files in /proc/bus/usb/* are not
char device files; they are regular files and so they don't get any
special locking.  Furthermore it's necessary to acquire the same lock in
the release and remove routines, which the code does not do.

Yet another problem arises because the same file_operations structure is
accessible through both the /proc/bus/usb/* and /dev/usb/usbdev* file
nodes.  Even when one of them has been removed, it's still possible for
userspace to open the other.  So simple locking around the individual
remove routines is insufficient; we need to lock the entire
usb_notify_remove_device notifier chain.

Rather than rely on the BKL, this patch (as723) introduces a new private
mutex for the purpose.  Holding the BKL while invoking a notifier chain
doesn't seem like a good idea.

Cc: Dave Jones &lt;davej@redhat.com&gt;
[https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=212952]
Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Chris Wright &lt;chrisw@sous-sol.org&gt;
</content>
</entry>
<entry>
<title>Revert "[PATCH] USB: move usb_device_class class devices to be real devices"</title>
<updated>2006-08-02T23:52:10+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@suse.de</email>
</author>
<published>2006-08-02T23:52:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cae74b30dd98c10baa5b47b4698bf67e5eb15687'/>
<id>urn:sha1:cae74b30dd98c10baa5b47b4698bf67e5eb15687</id>
<content type='text'>
This reverts c182274ffe1277f4e7c564719a696a37cacf74ea commit because it
required a newer version of udev to work properly than what is currently
documented in Documentation/Changes.

Cc: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>Revert "[PATCH] USB: convert usb class devices to real devices"</title>
<updated>2006-08-02T23:49:37+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@suse.de</email>
</author>
<published>2006-08-02T23:49:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=27fb4f0a7f00fda4044de44dcbe4d65b8359cc38'/>
<id>urn:sha1:27fb4f0a7f00fda4044de44dcbe4d65b8359cc38</id>
<content type='text'>
This reverts bd00949647ddcea47ce4ea8bb2cfcfc98ebf9f2a commit because it
required a newer version of udev to work properly than what is currently
documented in Documentation/Changes.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>[PATCH] USB: remove devfs information from Kconfig</title>
<updated>2006-07-12T23:03:23+00:00</updated>
<author>
<name>Michal Piotrowski</name>
<email>michal.k.k.piotrowski@gmail.com</email>
</author>
<published>2006-07-03T12:20:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=49e523b90741b936c874c376b5d140add5c0084d'/>
<id>urn:sha1:49e523b90741b936c874c376b5d140add5c0084d</id>
<content type='text'>
Devfs is gone. We can remove that information.

Signed-off-by: Michal Piotrowski &lt;michal.k.k.piotrowski@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>[PATCH] usbcore: fixes for hub_port_resume</title>
<updated>2006-07-12T23:03:22+00:00</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2006-06-28T15:20:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=20307949469269ceea6262aaa306dcb55cf43b25'/>
<id>urn:sha1:20307949469269ceea6262aaa306dcb55cf43b25</id>
<content type='text'>
This patch (as731) makes a couple of small fixes to the hub_port_resume
routine:

	Don't return status &gt;= 0 when an error occurs;

	Clear the port-change-suspend status indicator after
	resuming a device.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>[PATCH] USB hub: don't return status &gt; 0 from resume</title>
<updated>2006-07-12T23:03:22+00:00</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2006-06-19T19:12:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b40b7a905ce57608ca93c5032d5ab1f5508d2f11'/>
<id>urn:sha1:b40b7a905ce57608ca93c5032d5ab1f5508d2f11</id>
<content type='text'>
finish_device_resume() in the hub driver isn't careful always to return
a negative code in all the error pathways.  It also doesn't return 0 in
all the success pathways.  This patch (as724) fixes the behavior.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>[PATCH] usbfs: use the correct signal number for disconnection</title>
<updated>2006-07-12T23:03:21+00:00</updated>
<author>
<name>Zoran Marceta</name>
<email>Zoran.Marceta@micronasnit.com</email>
</author>
<published>2006-06-22T17:28:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=58a5b0a6346b71bf01f0d49cfcc91d3225a373aa'/>
<id>urn:sha1:58a5b0a6346b71bf01f0d49cfcc91d3225a373aa</id>
<content type='text'>
usbfs stores the wrong signal number in the siginfo structure used for
notifying user programs about device disconnect.  This patch (as726)
fixes it.

From: Zoran Marceta &lt;Zoran.Marceta@micronasnit.com&gt;
Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>[PATCH] lockdep: annotate USBFS</title>
<updated>2006-07-03T22:27:08+00:00</updated>
<author>
<name>Arjan van de Ven</name>
<email>arjan@linux.intel.com</email>
</author>
<published>2006-07-03T07:25:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8e7795ef6b5fd117b22b87ea7d501de2526a25f7'/>
<id>urn:sha1:8e7795ef6b5fd117b22b87ea7d501de2526a25f7</id>
<content type='text'>
In usbfs's fs_remove_file() function, the aim is to remove a file or
directory from usbfs. This is done by first taking the i_mutex of the
parent directory of this file/dir via
  mutex_lock(&amp;parent-&gt;d_inode-&gt;i_mutex);
and then to call either usbfs_rmdir() for a directory or usbfs_unlink()
for a file. Both these functions then take the i_mutex for the
to-be-removed object themselves:
  mutex_lock(&amp;inode-&gt;i_mutex);

This is a classical parent-&gt;child locking order relationship that the VFS uses
all over the place; the VFS locking rule is "you need to take the parent
first".  This patch annotates the usbfs code to make this explicit and thus
informs the lockdep code that those two locks indeed have this relationship.

The rules for unlink that we already use in the VFS for unlink are to use
I_MUTEX_PARENT for the parent directory, and a normal mutex for the file
itself; this patch follows that convention.

Has no effect on non-lockdep kernels.

Signed-off-by: Arjan van de Ven &lt;arjan@linux.intel.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Greg KH &lt;greg@kroah.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] lockdep: annotate i_mutex</title>
<updated>2006-07-03T22:27:06+00:00</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2006-07-03T07:25:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f2eace23e924bd3f05aedea4fc505eb5508d2d93'/>
<id>urn:sha1:f2eace23e924bd3f05aedea4fc505eb5508d2d93</id>
<content type='text'>
Teach special (recursive) locking code to the lock validator.  Has no effect
on non-lockdep kernels.

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Arjan van de Ven &lt;arjan@linux.intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] irq-flags: usb: Use the new IRQF_ constants</title>
<updated>2006-07-02T20:58:53+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2006-07-02T02:29:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d54b5caa832caa3715a458115b6ea79ad17c4f31'/>
<id>urn:sha1:d54b5caa832caa3715a458115b6ea79ad17c4f31</id>
<content type='text'>
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Greg KH &lt;greg@kroah.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
</feed>
