<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/usb/class, branch v3.0.35</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v3.0.35</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v3.0.35'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2012-06-01T07:12:55+00:00</updated>
<entry>
<title>USB: cdc-wdm: poll must return POLLHUP if device is gone</title>
<updated>2012-06-01T07:12:55+00:00</updated>
<author>
<name>Bjørn Mork</name>
<email>bjorn@mork.no</email>
</author>
<published>2012-05-09T11:53:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bfd6d6af769c5cd62aa9ed75b038ea3d234b090b'/>
<id>urn:sha1:bfd6d6af769c5cd62aa9ed75b038ea3d234b090b</id>
<content type='text'>
commit 616b6937e348ef2b4c6ea5fef2cd3c441145efb0 upstream.

Else the poll will be restarted indefinitely in a tight loop,
preventing final device cleanup.

Cc: Oliver Neukum &lt;oliver@neukum.org&gt;
Signed-off-by: Bjørn Mork &lt;bjorn@mork.no&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>USB: cdc-wdm: fix race leading leading to memory corruption</title>
<updated>2012-05-07T15:56:36+00:00</updated>
<author>
<name>Oliver Neukum</name>
<email>oliver@neukum.org</email>
</author>
<published>2012-04-26T19:59:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=197d1155b07b582d9969f456f61ee07d632af7e1'/>
<id>urn:sha1:197d1155b07b582d9969f456f61ee07d632af7e1</id>
<content type='text'>
commit 5c22837adca7c30b66121cf18ad3e160134268d4 upstream.

This patch fixes a race whereby a pointer to a buffer
would be overwritten while the buffer was in use leading
to a double free and a memory leak. This causes crashes.
This bug was introduced in 2.6.34

Signed-off-by: Oliver Neukum &lt;oneukum@suse.de&gt;
Tested-by: Bjørn Mork &lt;bjorn@mork.no&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>cdc-wdm: Don't clear WDM_READ unless entire read buffer is emptied</title>
<updated>2012-04-02T16:27:04+00:00</updated>
<author>
<name>Ben Hutchings</name>
<email>ben@decadent.org.uk</email>
</author>
<published>2012-02-12T06:02:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e6d2220d391eb13af9a742428f6d395e0a4dea5c'/>
<id>urn:sha1:e6d2220d391eb13af9a742428f6d395e0a4dea5c</id>
<content type='text'>
commit b7a205545345578712611106b371538992e142ff upstream.

The WDM_READ flag is cleared later iff desc-&gt;length is reduced to 0.

Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Tested-by: Bjørn Mork &lt;bjorn@mork.no&gt;
Cc: Oliver Neukum &lt;oliver@neukum.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>cdc-wdm: Fix more races on the read path</title>
<updated>2012-04-02T16:26:59+00:00</updated>
<author>
<name>Ben Hutchings</name>
<email>ben@decadent.org.uk</email>
</author>
<published>2012-02-12T06:00:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3b804c7c32ed23181025a5184cae7e2d5a237f48'/>
<id>urn:sha1:3b804c7c32ed23181025a5184cae7e2d5a237f48</id>
<content type='text'>
commit 711c68b3c0f7a924ffbee4aa962d8f62b85188ff upstream.

We must not allow the input buffer length to change while we're
shuffling the buffer contents.  We also mustn't clear the WDM_READ
flag after more data might have arrived.  Therefore move both of these
into the spinlocked region at the bottom of wdm_read().

When reading desc-&gt;length without holding the iuspin lock, use
ACCESS_ONCE() to ensure the compiler doesn't re-read it with
inconsistent results.

Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Tested-by: Bjørn Mork &lt;bjorn@mork.no&gt;
Cc: Oliver Neukum &lt;oliver@neukum.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>USB: cdc-wdm: Avoid hanging on interface with no USB_CDC_DMM_TYPE</title>
<updated>2012-02-03T17:19:02+00:00</updated>
<author>
<name>Bjørn Mork</name>
<email>bjorn@mork.no</email>
</author>
<published>2012-01-20T00:49:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4df9c291640da8992e146076f57a8e563c449e31'/>
<id>urn:sha1:4df9c291640da8992e146076f57a8e563c449e31</id>
<content type='text'>
commit 15699e6fafc3a90e5fdc2ef30555a04dee62286f upstream.

The probe does not strictly require the USB_CDC_DMM_TYPE
descriptor, which is a good thing as it makes the driver
usable on non-conforming interfaces.  A user could e.g.
bind to it to a CDC ECM interface by using the new_id and
bind sysfs files.  But this would fail with a 0 buffer length
due to the missing descriptor.

Fix by defining a reasonable fallback size: The minimum
device receive buffer size required by the CDC WMC standard,
revision 1.1

Signed-off-by: Bjørn Mork &lt;bjorn@mork.no&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>USB: cdc-wdm: better allocate a buffer that is at least as big as we tell the USB core</title>
<updated>2012-02-03T17:19:02+00:00</updated>
<author>
<name>Bjørn Mork</name>
<email>bjorn@mork.no</email>
</author>
<published>2012-01-16T14:11:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5256ca41663c848ac24783a5161a97730a21696c'/>
<id>urn:sha1:5256ca41663c848ac24783a5161a97730a21696c</id>
<content type='text'>
commit 655e247daf52b202a6c2d0f8a06dd2051e756ce4 upstream.

As it turns out, there was a mismatch between the allocated inbuf size
(desc-&gt;bMaxPacketSize0, typically something like 64) and the length we
specified in the URB (desc-&gt;wMaxCommand, typically something like 2048)

Signed-off-by: Bjørn Mork &lt;bjorn@mork.no&gt;
Cc: Oliver Neukum &lt;oliver@neukum.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>USB: cdc-wdm: call wake_up_all to allow driver to shutdown on device removal</title>
<updated>2012-02-03T17:19:02+00:00</updated>
<author>
<name>Bjørn Mork</name>
<email>bjorn@mork.no</email>
</author>
<published>2012-01-16T14:11:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f1abac982c49f35615f47ff1f94a8ca5ba962bd8'/>
<id>urn:sha1:f1abac982c49f35615f47ff1f94a8ca5ba962bd8</id>
<content type='text'>
commit 62aaf24dc125d7c55c93e313d15611f152b030c7 upstream.

wdm_disconnect() waits for the mutex held by wdm_read() before
calling wake_up_all().  This causes a deadlock, preventing device removal
to complete.  Do the wake_up_all() before we start waiting for the locks.

Signed-off-by: Bjørn Mork &lt;bjorn@mork.no&gt;
Cc: Oliver Neukum &lt;oliver@neukum.org&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>USB: cdc-wdm: use two mutexes to allow simultaneous read and write</title>
<updated>2012-02-03T17:18:59+00:00</updated>
<author>
<name>Bjørn Mork</name>
<email>bjorn@mork.no</email>
</author>
<published>2012-01-16T11:41:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c40c07af28b365175593f69a7391a3b6cfd8ac12'/>
<id>urn:sha1:c40c07af28b365175593f69a7391a3b6cfd8ac12</id>
<content type='text'>
commit e8537bd2c4f325a4796da33564ddcef9489b7feb upstream.

using a separate read and write mutex for locking is sufficient to make the
driver accept simultaneous read and write. This improves useability a lot.

Signed-off-by: Bjørn Mork &lt;bjorn@mork.no&gt;
Cc: Oliver Neukum &lt;oneukum@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>USB: cdc-wdm: updating desc-&gt;length must be protected by spin_lock</title>
<updated>2012-02-03T17:18:59+00:00</updated>
<author>
<name>Bjørn Mork</name>
<email>bjorn@mork.no</email>
</author>
<published>2012-01-16T11:41:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=906e114c35cd8f98be1f672a2f32c0cf9800296b'/>
<id>urn:sha1:906e114c35cd8f98be1f672a2f32c0cf9800296b</id>
<content type='text'>
commit c428b70c1e115c5649707a602742e34130d19428 upstream.

wdm_in_callback() will also touch this field, so we cannot change it without locking

Signed-off-by: Bjørn Mork &lt;bjorn@mork.no&gt;
Acked-by: Oliver Neukum &lt;oneukum@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: cdc-acm: Fix acm_tty_hangup() vs. acm_tty_close() race</title>
<updated>2012-01-12T19:35:53+00:00</updated>
<author>
<name>Thilo-Alexander Ginkel</name>
<email>thilo@ginkel.com</email>
</author>
<published>2011-12-17T09:55:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=68f760945cb704f4a9d0ae7c4abc9e41ca30aa91'/>
<id>urn:sha1:68f760945cb704f4a9d0ae7c4abc9e41ca30aa91</id>
<content type='text'>
[Not upstream as it was fixed differently for 3.3 with a much more
"intrusive" rework of the driver - gregkh]

There is a race condition involving acm_tty_hangup() and acm_tty_close()
where hangup() would attempt to access tty-&gt;driver_data without proper
locking and NULL checking after close() has potentially already set it
to NULL.  One possibility to (sporadically) trigger this behavior is to
perform a suspend/resume cycle with a running WWAN data connection.

This patch addresses the issue by introducing a NULL check for
tty-&gt;driver_data in acm_tty_hangup() protected by open_mutex and exiting
gracefully when hangup() is invoked on a device that has already been
closed.

Signed-off-by: Thilo-Alexander Ginkel &lt;thilo@ginkel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
</feed>
