<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/usb/class, branch v3.0.44</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/usb/class?h=v3.0.44</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/usb/class?h=v3.0.44'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-09-14T17:00:43Z</updated>
<entry>
<title>USB: CDC ACM: Fix NULL pointer dereference</title>
<updated>2012-09-14T17:00:43Z</updated>
<author>
<name>Sven Schnelle</name>
<email>svens@stackframe.org</email>
</author>
<published>2012-08-17T19:43:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=52340b63f6cf9f21051a8f91f42d8ca97415bd1a'/>
<id>urn:sha1:52340b63f6cf9f21051a8f91f42d8ca97415bd1a</id>
<content type='text'>
commit 99f347caa4568cb803862730b3b1f1942639523f upstream.

If a device specifies zero endpoints in its interface descriptor,
the kernel oopses in acm_probe(). Even though that's clearly an
invalid descriptor, we should test wether we have all endpoints.
This is especially bad as this oops can be triggered by just
plugging a USB device in.

Signed-off-by: Sven Schnelle &lt;svens@stackframe.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>USB: cdc-wdm: fix lockup on error in wdm_read</title>
<updated>2012-07-16T15:47:50Z</updated>
<author>
<name>Bjørn Mork</name>
<email>bjorn@mork.no</email>
</author>
<published>2012-07-02T08:33:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2a8d90cd4f0e7be30a8d486da1202752dc86e96f'/>
<id>urn:sha1:2a8d90cd4f0e7be30a8d486da1202752dc86e96f</id>
<content type='text'>
commit b086b6b10d9f182cd8d2f0dcfd7fd11edba93fc9 upstream.

Clear the WDM_READ flag on empty reads to avoid running
forever in an infinite tight loop, causing lockups:

Jul  1 21:58:11 nemi kernel: [ 3658.898647] qmi_wwan 2-1:1.2: Unexpected error -71
Jul  1 21:58:36 nemi kernel: [ 3684.072021] BUG: soft lockup - CPU#0 stuck for 23s! [qmi.pl:12235]
Jul  1 21:58:36 nemi kernel: [ 3684.072212] CPU 0
Jul  1 21:58:36 nemi kernel: [ 3684.072355]
Jul  1 21:58:36 nemi kernel: [ 3684.072367] Pid: 12235, comm: qmi.pl Tainted: P           O 3.5.0-rc2+ #13 LENOVO 2776LEG/2776LEG
Jul  1 21:58:36 nemi kernel: [ 3684.072383] RIP: 0010:[&lt;ffffffffa0635008&gt;]  [&lt;ffffffffa0635008&gt;] spin_unlock_irq+0x8/0xc [cdc_wdm]
Jul  1 21:58:36 nemi kernel: [ 3684.072388] RSP: 0018:ffff88022dca1e70  EFLAGS: 00000282
Jul  1 21:58:36 nemi kernel: [ 3684.072393] RAX: ffff88022fc3f650 RBX: ffffffff811c56f7 RCX: 00000001000ce8c1
Jul  1 21:58:36 nemi kernel: [ 3684.072398] RDX: 0000000000000010 RSI: 000000000267d810 RDI: ffff88022fc3f650
Jul  1 21:58:36 nemi kernel: [ 3684.072403] RBP: ffff88022dca1eb0 R08: ffffffffa063578e R09: 0000000000000000
Jul  1 21:58:36 nemi kernel: [ 3684.072407] R10: 0000000000000008 R11: 0000000000000246 R12: 0000000000000002
Jul  1 21:58:36 nemi kernel: [ 3684.072412] R13: 0000000000000246 R14: ffffffff00000002 R15: ffff8802281d8c88
Jul  1 21:58:36 nemi kernel: [ 3684.072418] FS:  00007f666a260700(0000) GS:ffff88023bc00000(0000) knlGS:0000000000000000
Jul  1 21:58:36 nemi kernel: [ 3684.072423] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Jul  1 21:58:36 nemi kernel: [ 3684.072428] CR2: 000000000270d9d8 CR3: 000000022e865000 CR4: 00000000000007f0
Jul  1 21:58:36 nemi kernel: [ 3684.072433] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Jul  1 21:58:36 nemi kernel: [ 3684.072438] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Jul  1 21:58:36 nemi kernel: [ 3684.072444] Process qmi.pl (pid: 12235, threadinfo ffff88022dca0000, task ffff88022ff76380)
Jul  1 21:58:36 nemi kernel: [ 3684.072448] Stack:
Jul  1 21:58:36 nemi kernel: [ 3684.072458]  ffffffffa063592e 0000000100020000 ffff88022fc3f650 ffff88022fc3f6a8
Jul  1 21:58:36 nemi kernel: [ 3684.072466]  0000000000000200 0000000100000000 000000000267d810 0000000000000000
Jul  1 21:58:36 nemi kernel: [ 3684.072475]  0000000000000000 ffff880212cfb6d0 0000000000000200 ffff880212cfb6c0
Jul  1 21:58:36 nemi kernel: [ 3684.072479] Call Trace:
Jul  1 21:58:36 nemi kernel: [ 3684.072489]  [&lt;ffffffffa063592e&gt;] ? wdm_read+0x1a0/0x263 [cdc_wdm]
Jul  1 21:58:36 nemi kernel: [ 3684.072500]  [&lt;ffffffff8110adb7&gt;] ? vfs_read+0xa1/0xfb
Jul  1 21:58:36 nemi kernel: [ 3684.072509]  [&lt;ffffffff81040589&gt;] ? alarm_setitimer+0x35/0x64
Jul  1 21:58:36 nemi kernel: [ 3684.072517]  [&lt;ffffffff8110aec7&gt;] ? sys_read+0x45/0x6e
Jul  1 21:58:36 nemi kernel: [ 3684.072525]  [&lt;ffffffff813725f9&gt;] ? system_call_fastpath+0x16/0x1b
Jul  1 21:58:36 nemi kernel: [ 3684.072557] Code: &lt;66&gt; 66 90 c3 83 ff ed 89 f8 74 16 7f 06 83 ff a1 75 0a c3 83 ff f4

The WDM_READ flag is normally cleared by wdm_int_callback
before resubmitting the read urb, and set by wdm_in_callback
when this urb returns with data or an error.  But a crashing
device may cause both a read error and cancelling all urbs.
Make sure that the flag is cleared by wdm_read if the buffer
is empty.

We don't clear the flag on errors, as there may be pending
data in the buffer which should be processed.  The flag will
instead be cleared on the next wdm_read call.

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 devices not unthrottled on open</title>
<updated>2012-06-22T18:34:15Z</updated>
<author>
<name>Otto Meta</name>
<email>otto.patches@sister-shadow.de</email>
</author>
<published>2012-06-06T16:46:21Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=94b71da9193eb95eeef8d09172998c37c2c78327'/>
<id>urn:sha1:94b71da9193eb95eeef8d09172998c37c2c78327</id>
<content type='text'>
commit 6c4707f3f8c44ec18282e1c014c80e1c257042f9 upstream.

Currently CDC-ACM devices stay throttled when their TTY is closed while
throttled, stalling further communication attempts after the next open.

Unthrottling during open/activate got lost starting with kernel
3.0.0 and this patch reintroduces it.

Signed-off-by: Otto Meta &lt;otto.patches@sister-shadow.de&gt;
Acked-by: Johan Hovold &lt;jhovold@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>USB: cdc-wdm: poll must return POLLHUP if device is gone</title>
<updated>2012-06-01T07:12:55Z</updated>
<author>
<name>Bjørn Mork</name>
<email>bjorn@mork.no</email>
</author>
<published>2012-05-09T11:53:21Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/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:36Z</updated>
<author>
<name>Oliver Neukum</name>
<email>oliver@neukum.org</email>
</author>
<published>2012-04-26T19:59:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/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:04Z</updated>
<author>
<name>Ben Hutchings</name>
<email>ben@decadent.org.uk</email>
</author>
<published>2012-02-12T06:02:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/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:59Z</updated>
<author>
<name>Ben Hutchings</name>
<email>ben@decadent.org.uk</email>
</author>
<published>2012-02-12T06:00:41Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/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:02Z</updated>
<author>
<name>Bjørn Mork</name>
<email>bjorn@mork.no</email>
</author>
<published>2012-01-20T00:49:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/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:02Z</updated>
<author>
<name>Bjørn Mork</name>
<email>bjorn@mork.no</email>
</author>
<published>2012-01-16T14:11:59Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/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:02Z</updated>
<author>
<name>Bjørn Mork</name>
<email>bjorn@mork.no</email>
</author>
<published>2012-01-16T14:11:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/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>
</feed>
