<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/usb/class/usblp.c, branch linux-4.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.9.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.9.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2021-02-10T08:09:25Z</updated>
<entry>
<title>USB: usblp: don't call usb_set_interface if there's a single alt</title>
<updated>2021-02-10T08:09:25Z</updated>
<author>
<name>Jeremy Figgins</name>
</author>
<published>2021-01-24T00:21:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b76c2952453c408ab79c082a848678c743eb95a5'/>
<id>urn:sha1:b76c2952453c408ab79c082a848678c743eb95a5</id>
<content type='text'>
commit d8c6edfa3f4ee0d45d7ce5ef18d1245b78774b9d upstream.

Some devices, such as the Winbond Electronics Corp. Virtual Com Port
(Vendor=0416, ProdId=5011), lockup when usb_set_interface() or
usb_clear_halt() are called. This device has only a single
altsetting, so it should not be necessary to call usb_set_interface().

Acked-by: Pete Zaitcev &lt;zaitcev@redhat.com&gt;
Signed-off-by: Jeremy Figgins &lt;kernel@jeremyfiggins.com&gt;
Link: https://lore.kernel.org/r/YAy9kJhM/rG8EQXC@watson
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: usblp: fix DMA to stack</title>
<updated>2021-01-12T18:49:04Z</updated>
<author>
<name>Johan Hovold</name>
</author>
<published>2021-01-04T14:53:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=885281cc1e32ebf4aee132b296e58b5816bf2277'/>
<id>urn:sha1:885281cc1e32ebf4aee132b296e58b5816bf2277</id>
<content type='text'>
commit 020a1f453449294926ca548d8d5ca970926e8dfd upstream.

Stack-allocated buffers cannot be used for DMA (on all architectures).

Replace the HP-channel macro with a helper function that allocates a
dedicated transfer buffer so that it can continue to be used with
arguments from the stack.

Note that the buffer is cleared on allocation as usblp_ctrl_msg()
returns success also on short transfers (the buffer is only used for
debugging).

Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Link: https://lore.kernel.org/r/20210104145302.2087-1-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usblp: fix race between disconnect() and read()</title>
<updated>2020-09-23T06:46:16Z</updated>
<author>
<name>Oliver Neukum</name>
</author>
<published>2020-09-17T10:34:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=11ecdfc83ae28feef098ec26cf7e1cbe4a65175d'/>
<id>urn:sha1:11ecdfc83ae28feef098ec26cf7e1cbe4a65175d</id>
<content type='text'>
commit 9cdabcb3ef8c24ca3a456e4db7b012befb688e73 upstream.

read() needs to check whether the device has been
disconnected before it tries to talk to the device.

Signed-off-by: Oliver Neukum &lt;oneukum@suse.com&gt;
Reported-by: syzbot+be5b5f86a162a6c281e6@syzkaller.appspotmail.com
Link: https://lore.kernel.org/r/20200917103427.15740-1-oneukum@suse.com
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usblp: poison URBs upon disconnect</title>
<updated>2020-06-30T19:38:21Z</updated>
<author>
<name>Oliver Neukum</name>
</author>
<published>2020-05-07T08:58:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=372a8b5aec4808ea7114c0753667d131e8b435b6'/>
<id>urn:sha1:372a8b5aec4808ea7114c0753667d131e8b435b6</id>
<content type='text'>
[ Upstream commit 296a193b06120aa6ae7cf5c0d7b5e5b55968026e ]

syzkaller reported an URB that should have been killed to be active.
We do not understand it, but this should fix the issue if it is real.

Signed-off-by: Oliver Neukum &lt;oneukum@suse.com&gt;
Reported-by: syzbot+be5b5f86a162a6c281e6@syzkaller.appspotmail.com
Link: https://lore.kernel.org/r/20200507085806.5793-1-oneukum@suse.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>USB: usblp: fix use-after-free on disconnect</title>
<updated>2019-10-29T08:15:17Z</updated>
<author>
<name>Johan Hovold</name>
</author>
<published>2019-10-15T17:55:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e5e48d279fce3d6536b0f70c786f7e98d8f84e1c'/>
<id>urn:sha1:e5e48d279fce3d6536b0f70c786f7e98d8f84e1c</id>
<content type='text'>
commit 7a759197974894213621aa65f0571b51904733d6 upstream.

A recent commit addressing a runtime PM use-count regression, introduced
a use-after-free by not making sure we held a reference to the struct
usb_interface for the lifetime of the driver data.

Fixes: 9a31535859bf ("USB: usblp: fix runtime PM after driver unbind")
Cc: stable &lt;stable@vger.kernel.org&gt;
Reported-by: syzbot+cd24df4d075c319ebfc5@syzkaller.appspotmail.com
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Link: https://lore.kernel.org/r/20191015175522.18490-1-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>USB: usblp: fix runtime PM after driver unbind</title>
<updated>2019-10-17T20:42:36Z</updated>
<author>
<name>Johan Hovold</name>
</author>
<published>2019-10-01T08:49:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=25184b8618959d6082b30f3e8318ffc467426e40'/>
<id>urn:sha1:25184b8618959d6082b30f3e8318ffc467426e40</id>
<content type='text'>
commit 9a31535859bfd8d1c3ed391f5e9247cd87bb7909 upstream.

Since commit c2b71462d294 ("USB: core: Fix bug caused by duplicate
interface PM usage counter") USB drivers must always balance their
runtime PM gets and puts, including when the driver has already been
unbound from the interface.

Leaving the interface with a positive PM usage counter would prevent a
later bound driver from suspending the device.

Fixes: c2b71462d294 ("USB: core: Fix bug caused by duplicate interface PM usage counter")
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Link: https://lore.kernel.org/r/20191001084908.2003-3-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usblp: do not set TASK_INTERRUPTIBLE before lock</title>
<updated>2015-11-20T00:31:42Z</updated>
<author>
<name>Jiri Slaby</name>
</author>
<published>2015-11-02T09:27:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=19cd80a214821f4b558560ebd76bfb2c38b4f3d8'/>
<id>urn:sha1:19cd80a214821f4b558560ebd76bfb2c38b4f3d8</id>
<content type='text'>
It is not permitted to set task state before lock. usblp_wwait sets
the state to TASK_INTERRUPTIBLE and calls mutex_lock_interruptible.
Upon return from that function, the state will be TASK_RUNNING again.

This is clearly a bug and a warning is generated with LOCKDEP too:
WARNING: CPU: 1 PID: 5109 at kernel/sched/core.c:7404 __might_sleep+0x7d/0x90()
do not call blocking ops when !TASK_RUNNING; state=1 set at [&lt;ffffffffa0c588d0&gt;] usblp_wwait+0xa0/0x310 [usblp]
Modules linked in: ...
CPU: 1 PID: 5109 Comm: captmon Tainted: G        W       4.2.5-0.gef2823b-default #1
Hardware name: LENOVO 23252SG/23252SG, BIOS G2ET33WW (1.13 ) 07/24/2012
 ffffffff81a4edce ffff880236ec7ba8 ffffffff81716651 0000000000000000
 ffff880236ec7bf8 ffff880236ec7be8 ffffffff8106e146 0000000000000282
 ffffffff81a50119 000000000000028b 0000000000000000 ffff8802dab7c508
Call Trace:
...
 [&lt;ffffffff8106e1c6&gt;] warn_slowpath_fmt+0x46/0x50
 [&lt;ffffffff8109a8bd&gt;] __might_sleep+0x7d/0x90
 [&lt;ffffffff8171b20f&gt;] mutex_lock_interruptible_nested+0x2f/0x4b0
 [&lt;ffffffffa0c588fc&gt;] usblp_wwait+0xcc/0x310 [usblp]
 [&lt;ffffffffa0c58bb2&gt;] usblp_write+0x72/0x350 [usblp]
 [&lt;ffffffff8121ed98&gt;] __vfs_write+0x28/0xf0
...

Commit 7f477358e2384c54b190cc3b6ce28277050a041b (usblp: Implement the
ENOSPC convention) moved the set prior locking. So move it back after
the lock.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Fixes: 7f477358e2 ("usblp: Implement the ENOSPC convention")
Acked-By: Pete Zaitcev &lt;zaitcev@yahoo.com&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: class: Use USB_CLASS_PRINTER instead of number 7</title>
<updated>2015-07-22T21:55:21Z</updated>
<author>
<name>Krzysztof Opasiak</name>
</author>
<published>2015-06-22T13:50:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=298b992fdb7536f0f347935d253ce31479b1fb43'/>
<id>urn:sha1:298b992fdb7536f0f347935d253ce31479b1fb43</id>
<content type='text'>
Kernel provides very nice defines for USB device class
so it's a good idea to use them in suitable places.
It is much easier to grep for such define instead of 7.

Signed-off-by: Krzysztof Opasiak &lt;k.opasiak@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: usblp.c: move assignment out of if () block</title>
<updated>2015-05-10T14:01:12Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
</author>
<published>2015-04-30T09:33:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2fcdbdfd77d80a6de6c625b84574b063cad29cc8'/>
<id>urn:sha1:2fcdbdfd77d80a6de6c625b84574b063cad29cc8</id>
<content type='text'>
We should not be doing assignments within an if () block
so fix up the code to not do this.

change was created using Coccinelle.

Acked-by: Pete Zaitcev &lt;zaitcev@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Reviewed-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
</entry>
<entry>
<title>usb: delete non-required instances of include &lt;linux/init.h&gt;</title>
<updated>2014-01-08T23:01:39Z</updated>
<author>
<name>Paul Gortmaker</name>
</author>
<published>2014-01-08T16:08:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=803a536243b3a1ed2289f41897b11b72bd083309'/>
<id>urn:sha1:803a536243b3a1ed2289f41897b11b72bd083309</id>
<content type='text'>
None of these files are actually using any __init type directives
and hence don't need to include &lt;linux/init.h&gt;.  Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
