<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/usb/class, branch v3.2.18</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/usb/class?h=v3.2.18</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/usb/class?h=v3.2.18'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-05-11T12:14:41Z</updated>
<entry>
<title>USB: cdc-wdm: fix race leading leading to memory corruption</title>
<updated>2012-05-11T12:14:41Z</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=670515c56290b7b7435f066e9bc0999fa1fc29b7'/>
<id>urn:sha1:670515c56290b7b7435f066e9bc0999fa1fc29b7</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;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>cdc-wdm: Don't clear WDM_READ unless entire read buffer is emptied</title>
<updated>2012-04-02T16:52:31Z</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=3d8e1c65555c758475a005c287f1c4b69296b226'/>
<id>urn:sha1:3d8e1c65555c758475a005c287f1c4b69296b226</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:52:31Z</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=8d272f9af55e8900fc96886bd72b158482ed55d0'/>
<id>urn:sha1:8d272f9af55e8900fc96886bd72b158482ed55d0</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:22:17Z</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=1cbb2489441fe3dbb28dc4920f3494898b3d09df'/>
<id>urn:sha1:1cbb2489441fe3dbb28dc4920f3494898b3d09df</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:22:17Z</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=7a55df4694e1758a7a1c3b1432e36fca0c859d6a'/>
<id>urn:sha1:7a55df4694e1758a7a1c3b1432e36fca0c859d6a</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:22:16Z</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=4ac2b6d3cc5d685f8701a392bdea04a401333a11'/>
<id>urn:sha1:4ac2b6d3cc5d685f8701a392bdea04a401333a11</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:22:02Z</updated>
<author>
<name>Bjørn Mork</name>
<email>bjorn@mork.no</email>
</author>
<published>2012-01-16T11:41:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d8e13a17cf397abfdef1d27fe70ad8aeff75ffdd'/>
<id>urn:sha1:d8e13a17cf397abfdef1d27fe70ad8aeff75ffdd</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:22:01Z</updated>
<author>
<name>Bjørn Mork</name>
<email>bjorn@mork.no</email>
</author>
<published>2012-01-16T11:41:47Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3f60c1956f3392760d3c969f19f41d4aa653f726'/>
<id>urn:sha1:3f60c1956f3392760d3c969f19f41d4aa653f726</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:29:46Z</updated>
<author>
<name>Thilo-Alexander Ginkel</name>
<email>thilo@ginkel.com</email>
</author>
<published>2011-12-17T09:55:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f9fd8d6232137e255fc9409a81cf282817472b6f'/>
<id>urn:sha1:f9fd8d6232137e255fc9409a81cf282817472b6f</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>
<entry>
<title>drivers/usb/class/cdc-acm.c: clear dangling pointer</title>
<updated>2012-01-12T19:29:38Z</updated>
<author>
<name>Julia Lawall</name>
<email>julia@diku.dk</email>
</author>
<published>2011-12-23T13:02:55Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=30234e2694cbc1d6985cafc87db5cd4848493196'/>
<id>urn:sha1:30234e2694cbc1d6985cafc87db5cd4848493196</id>
<content type='text'>
commit e7c8e8605d0bafc705ff27f9da98a1668427cc0f upstream.

On some failures, the country_code field of an acm structure is freed
without freeing the acm structure itself.  Elsewhere, operations including
memcpy and kfree are performed on the country_code field.  The patch sets
the country_code field to NULL when it is freed, and likewise sets the
country_code_size field to 0.

Signed-off-by: Julia Lawall &lt;julia@diku.dk&gt;
Acked-by: Oliver Neukum &lt;oneukum@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
</feed>
