<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/usb/class/usblp.c, branch linux-6.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2022-10-20T10:11:56Z</updated>
<entry>
<title>USB: make devnode() callback in usb_class_driver take a const *</title>
<updated>2022-10-20T10:11:56Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2022-10-01T16:51:28Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5033ac5c580cb22245a0c2b9e53d508e8fdd50d8'/>
<id>urn:sha1:5033ac5c580cb22245a0c2b9e53d508e8fdd50d8</id>
<content type='text'>
With the changes to the driver core to make more pointers const, the USB
subsystem also needs to be modified to take a const * for the devnode
callback so that the driver core's constant pointer will also be
properly propagated.

Cc: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Cc: Juergen Stuber &lt;starblue@users.sourceforge.net&gt;
Reviewed-by: Johan Hovold &lt;johan@kernel.org&gt;
Acked-by: Pete Zaitcev &lt;zaitcev@redhat.com&gt;
Reviewed-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
Link: https://lore.kernel.org/r/20221001165128.2688526-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: usblp: fix a hang in poll() if disconnected</title>
<updated>2021-03-10T08:36:13Z</updated>
<author>
<name>Pete Zaitcev</name>
<email>zaitcev@redhat.com</email>
</author>
<published>2021-03-04T04:10:53Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=9de2c43acf37a17dc4c69ff78bb099b80fb74325'/>
<id>urn:sha1:9de2c43acf37a17dc4c69ff78bb099b80fb74325</id>
<content type='text'>
Apparently an application that opens a device and calls select()
on it, will hang if the decice is disconnected. It's a little
surprising that we had this bug for 15 years, but apparently
nobody ever uses select() with a printer: only write() and read(),
and those work fine. Well, you can also select() with a timeout.

The fix is modeled after devio.c. A few other drivers check the
condition first, then do not add the wait queue in case the
device is disconnected. We doubt that's completely race-free.
So, this patch adds the process first, then locks properly
and checks for the disconnect.

Reviewed-by: Zqiang &lt;qiang.zhang@windriver.com&gt;
Signed-off-by: Pete Zaitcev &lt;zaitcev@redhat.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/20210303221053.1cf3313e@suzdal.zaitcev.lan
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: usblp: don't call usb_set_interface if there's a single alt</title>
<updated>2021-01-26T14:15:31Z</updated>
<author>
<name>Jeremy Figgins</name>
<email>kernel@jeremyfiggins.com</email>
</author>
<published>2021-01-24T00:21:36Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d8c6edfa3f4ee0d45d7ce5ef18d1245b78774b9d'/>
<id>urn:sha1:d8c6edfa3f4ee0d45d7ce5ef18d1245b78774b9d</id>
<content type='text'>
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-04T15:51:35Z</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2021-01-04T14:53:02Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=020a1f453449294926ca548d8d5ca970926e8dfd'/>
<id>urn:sha1:020a1f453449294926ca548d8d5ca970926e8dfd</id>
<content type='text'>
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-17T16:45:30Z</updated>
<author>
<name>Oliver Neukum</name>
<email>oneukum@suse.com</email>
</author>
<published>2020-09-17T10:34:27Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=9cdabcb3ef8c24ca3a456e4db7b012befb688e73'/>
<id>urn:sha1:9cdabcb3ef8c24ca3a456e4db7b012befb688e73</id>
<content type='text'>
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-05-13T12:20:00Z</updated>
<author>
<name>Oliver Neukum</name>
<email>oneukum@suse.com</email>
</author>
<published>2020-05-07T08:58:06Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=296a193b06120aa6ae7cf5c0d7b5e5b55968026e'/>
<id>urn:sha1:296a193b06120aa6ae7cf5c0d7b5e5b55968026e</id>
<content type='text'>
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;
</content>
</entry>
<entry>
<title>USB: usblp: fix use-after-free on disconnect</title>
<updated>2019-10-15T18:19:19Z</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2019-10-15T17:55:22Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7a759197974894213621aa65f0571b51904733d6'/>
<id>urn:sha1:7a759197974894213621aa65f0571b51904733d6</id>
<content type='text'>
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-04T12:38:45Z</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2019-10-01T08:49:06Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=9a31535859bfd8d1c3ed391f5e9247cd87bb7909'/>
<id>urn:sha1:9a31535859bfd8d1c3ed391f5e9247cd87bb7909</id>
<content type='text'>
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>USB: usblp: convert to use dev_groups</title>
<updated>2019-08-09T05:55:44Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2019-08-06T14:44:55Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=02c4d45d838957971ec5b7ee359380a0ccfdb963'/>
<id>urn:sha1:02c4d45d838957971ec5b7ee359380a0ccfdb963</id>
<content type='text'>
USB drivers now support the ability for the driver core to handle the
creation and removal of device-specific sysfs files in a race-free
manner.  Take advantage of that by converting the driver to use this by
moving the sysfs attributes into a group and assigning the dev_groups
pointer to it.

Cc: Pete Zaitcev &lt;zaitcev@redhat.com&gt;
Link: https://lore.kernel.org/r/20190806144502.17792-6-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: usblp: use irqsave() in USB's complete callback</title>
<updated>2018-06-28T10:36:06Z</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2018-06-24T22:08:38Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=0f5f7ace852ff172d77dfbbc89e6a86349f7f476'/>
<id>urn:sha1:0f5f7ace852ff172d77dfbbc89e6a86349f7f476</id>
<content type='text'>
The USB completion callback does not disable interrupts while acquiring
the lock. We want to remove the local_irq_disable() invocation from
__usb_hcd_giveback_urb() and therefore it is required for the callback
handler to disable the interrupts while acquiring the lock.
The callback may be invoked either in IRQ or BH context depending on the
USB host controller.
Use the _irqsave() variant of the locking primitives.

Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Acked-by: Pete Zaitcev &lt;zaitcev@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
