<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/usb/misc, branch v4.4.261</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.4.261</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.4.261'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2021-01-12T18:47:56Z</updated>
<entry>
<title>USB: yurex: fix control-URB timeout handling</title>
<updated>2021-01-12T18:47:56Z</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2020-12-14T10:30:53Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b46cbd5344ee42a840d5fec9d9429833c8af2d0a'/>
<id>urn:sha1:b46cbd5344ee42a840d5fec9d9429833c8af2d0a</id>
<content type='text'>
commit 372c93131998c0622304bed118322d2a04489e63 upstream.

Make sure to always cancel the control URB in write() so that it can be
reused after a timeout or spurious CMD_ACK.

Currently any further write requests after a timeout would fail after
triggering a WARN() in usb_submit_urb() when attempting to submit the
already active URB.

Reported-by: syzbot+e87ebe0f7913f71f2ea5@syzkaller.appspotmail.com
Fixes: 6bc235a2e24a ("USB: add driver for Meywa-Denki &amp; Kayac YUREX")
Cc: stable &lt;stable@vger.kernel.org&gt;     # 2.6.37
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>USB: sisusbvga: Make console support depend on BROKEN</title>
<updated>2020-12-29T12:42:33Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2020-10-19T10:06:30Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2910d08b7c1d8326f7e10722e2710d29d7627f8c'/>
<id>urn:sha1:2910d08b7c1d8326f7e10722e2710d29d7627f8c</id>
<content type='text'>
commit 862ee699fefe1e6d6f2c1518395f0b999b8beb15 upstream.

The console part of sisusbvga is broken vs. printk(). It uses in_atomic()
to detect contexts in which it cannot sleep despite the big fat comment in
preempt.h which says: Do not use in_atomic() in driver code.

in_atomic() does not work on kernels with CONFIG_PREEMPT_COUNT=n which
means that spin/rw_lock held regions are not detected by it.

There is no way to make this work by handing context information through to
the driver and this only can be solved once the core printk infrastructure
supports sleepable console drivers.

Make it depend on BROKEN for now.

Fixes: 1bbb4f2035d9 ("[PATCH] USB: sisusb[vga] update")
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Thomas Winischhofer &lt;thomas@winischhofer.net&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: linux-usb@vger.kernel.org
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20201019101109.603244207@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>USB: adutux: fix debugging</title>
<updated>2020-11-10T09:22:14Z</updated>
<author>
<name>Oliver Neukum</name>
<email>oneukum@suse.com</email>
</author>
<published>2020-09-17T11:26:00Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0381f86573272ad3af3242bc0b13d1277b2fa814'/>
<id>urn:sha1:0381f86573272ad3af3242bc0b13d1277b2fa814</id>
<content type='text'>
[ Upstream commit c56150c1bc8da5524831b1dac2eec3c67b89f587 ]

Handling for removal of the controller was missing at one place.
Add it.

Signed-off-by: Oliver Neukum &lt;oneukum@suse.com&gt;
Link: https://lore.kernel.org/r/20200917112600.26508-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: yurex: Fix bad gfp argument</title>
<updated>2020-09-03T09:19:27Z</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2020-08-10T18:29:54Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9c218a4ad3d146a14c596e83426dc5ef3787cc3b'/>
<id>urn:sha1:9c218a4ad3d146a14c596e83426dc5ef3787cc3b</id>
<content type='text'>
commit f176ede3a3bde5b398a6777a7f9ff091baa2d3ff upstream.

The syzbot fuzzer identified a bug in the yurex driver: It passes
GFP_KERNEL as a memory-allocation flag to usb_submit_urb() at a time
when its state is TASK_INTERRUPTIBLE, not TASK_RUNNING:

do not call blocking ops when !TASK_RUNNING; state=1 set at [&lt;00000000370c7c68&gt;] prepare_to_wait+0xb1/0x2a0 kernel/sched/wait.c:247
WARNING: CPU: 1 PID: 340 at kernel/sched/core.c:7253 __might_sleep+0x135/0x190
kernel/sched/core.c:7253
Kernel panic - not syncing: panic_on_warn set ...
CPU: 1 PID: 340 Comm: syz-executor677 Not tainted 5.8.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google
01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0xf6/0x16e lib/dump_stack.c:118
 panic+0x2aa/0x6e1 kernel/panic.c:231
 __warn.cold+0x20/0x50 kernel/panic.c:600
 report_bug+0x1bd/0x210 lib/bug.c:198
 handle_bug+0x41/0x80 arch/x86/kernel/traps.c:234
 exc_invalid_op+0x14/0x40 arch/x86/kernel/traps.c:254
 asm_exc_invalid_op+0x12/0x20 arch/x86/include/asm/idtentry.h:536
RIP: 0010:__might_sleep+0x135/0x190 kernel/sched/core.c:7253
Code: 65 48 8b 1c 25 40 ef 01 00 48 8d 7b 10 48 89 fe 48 c1 ee 03 80 3c 06 00 75
2b 48 8b 73 10 48 c7 c7 e0 9e 06 86 e8 ed 12 f6 ff &lt;0f&gt; 0b e9 46 ff ff ff e8 1f
b2 4b 00 e9 29 ff ff ff e8 15 b2 4b 00
RSP: 0018:ffff8881cdb77a28 EFLAGS: 00010282
RAX: 0000000000000000 RBX: ffff8881c6458000 RCX: 0000000000000000
RDX: ffff8881c6458000 RSI: ffffffff8129ec93 RDI: ffffed1039b6ef37
RBP: ffffffff86fdade2 R08: 0000000000000001 R09: ffff8881db32f54f
R10: 0000000000000000 R11: 0000000030343354 R12: 00000000000001f2
R13: 0000000000000000 R14: 0000000000000068 R15: ffffffff83c1b1aa
 slab_pre_alloc_hook.constprop.0+0xea/0x200 mm/slab.h:498
 slab_alloc_node mm/slub.c:2816 [inline]
 slab_alloc mm/slub.c:2900 [inline]
 kmem_cache_alloc_trace+0x46/0x220 mm/slub.c:2917
 kmalloc include/linux/slab.h:554 [inline]
 dummy_urb_enqueue+0x7a/0x880 drivers/usb/gadget/udc/dummy_hcd.c:1251
 usb_hcd_submit_urb+0x2b2/0x22d0 drivers/usb/core/hcd.c:1547
 usb_submit_urb+0xb4e/0x13e0 drivers/usb/core/urb.c:570
 yurex_write+0x3ea/0x820 drivers/usb/misc/yurex.c:495

This patch changes the call to use GFP_ATOMIC instead of GFP_KERNEL.

Reported-and-tested-by: syzbot+c2c3302f9c601a4b1be2@syzkaller.appspotmail.com
Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
CC: &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/20200810182954.GB307778@rowland.harvard.edu
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>USB: lvtest: return proper error code in probe</title>
<updated>2020-09-03T09:19:26Z</updated>
<author>
<name>Evgeny Novikov</name>
<email>novikov@ispras.ru</email>
</author>
<published>2020-08-05T09:06:43Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e35d476bca93c276aeaa481d4b4da0eb21c50b80'/>
<id>urn:sha1:e35d476bca93c276aeaa481d4b4da0eb21c50b80</id>
<content type='text'>
commit 531412492ce93ea29b9ca3b4eb5e3ed771f851dd upstream.

lvs_rh_probe() can return some nonnegative value from usb_control_msg()
when it is less than "USB_DT_HUB_NONVAR_SIZE + 2" that is considered as
a failure. Make lvs_rh_probe() return -EINVAL in this case.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Evgeny Novikov &lt;novikov@ispras.ru&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/20200805090643.3432-1-novikov@ispras.ru
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>USB: sisusbvga: Fix a potential UB casued by left shifting a negative value</title>
<updated>2020-09-03T09:19:25Z</updated>
<author>
<name>Changming Liu</name>
<email>charley.ashbringer@gmail.com</email>
</author>
<published>2020-07-11T04:30:18Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=eebbe8dbd88893b86c25bc24ffe3227a0ca9b245'/>
<id>urn:sha1:eebbe8dbd88893b86c25bc24ffe3227a0ca9b245</id>
<content type='text'>
[ Upstream commit 2b53a19284f537168fb506f2f40d7fda40a01162 ]

The char buffer buf, receives data directly from user space,
so its content might be negative and its elements are left
shifted to form an unsigned integer.

Since left shifting a negative value is undefined behavior, thus
change the char to u8 to elimintate this UB.

Signed-off-by: Changming Liu &lt;charley.ashbringer@gmail.com&gt;
Link: https://lore.kernel.org/r/20200711043018.928-1-charley.ashbringer@gmail.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: usbtest: fix missing kfree(dev-&gt;buf) in usbtest_disconnect</title>
<updated>2020-07-09T07:35:08Z</updated>
<author>
<name>Zqiang</name>
<email>qiang.zhang@windriver.com</email>
</author>
<published>2020-06-12T03:52:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=831eebad70a25f55b5745453ac252d4afe997187'/>
<id>urn:sha1:831eebad70a25f55b5745453ac252d4afe997187</id>
<content type='text'>
[ Upstream commit 28ebeb8db77035e058a510ce9bd17c2b9a009dba ]

BUG: memory leak
unreferenced object 0xffff888055046e00 (size 256):
  comm "kworker/2:9", pid 2570, jiffies 4294942129 (age 1095.500s)
  hex dump (first 32 bytes):
    00 70 04 55 80 88 ff ff 18 bb 5a 81 ff ff ff ff  .p.U......Z.....
    f5 96 78 81 ff ff ff ff 37 de 8e 81 ff ff ff ff  ..x.....7.......
  backtrace:
    [&lt;00000000d121dccf&gt;] kmemleak_alloc_recursive
include/linux/kmemleak.h:43 [inline]
    [&lt;00000000d121dccf&gt;] slab_post_alloc_hook mm/slab.h:586 [inline]
    [&lt;00000000d121dccf&gt;] slab_alloc_node mm/slub.c:2786 [inline]
    [&lt;00000000d121dccf&gt;] slab_alloc mm/slub.c:2794 [inline]
    [&lt;00000000d121dccf&gt;] kmem_cache_alloc_trace+0x15e/0x2d0 mm/slub.c:2811
    [&lt;000000005c3c3381&gt;] kmalloc include/linux/slab.h:555 [inline]
    [&lt;000000005c3c3381&gt;] usbtest_probe+0x286/0x19d0
drivers/usb/misc/usbtest.c:2790
    [&lt;000000001cec6910&gt;] usb_probe_interface+0x2bd/0x870
drivers/usb/core/driver.c:361
    [&lt;000000007806c118&gt;] really_probe+0x48d/0x8f0 drivers/base/dd.c:551
    [&lt;00000000a3308c3e&gt;] driver_probe_device+0xfc/0x2a0 drivers/base/dd.c:724
    [&lt;000000003ef66004&gt;] __device_attach_driver+0x1b6/0x240
drivers/base/dd.c:831
    [&lt;00000000eee53e97&gt;] bus_for_each_drv+0x14e/0x1e0 drivers/base/bus.c:431
    [&lt;00000000bb0648d0&gt;] __device_attach+0x1f9/0x350 drivers/base/dd.c:897
    [&lt;00000000838b324a&gt;] device_initial_probe+0x1a/0x20 drivers/base/dd.c:944
    [&lt;0000000030d501c1&gt;] bus_probe_device+0x1e1/0x280 drivers/base/bus.c:491
    [&lt;000000005bd7adef&gt;] device_add+0x131d/0x1c40 drivers/base/core.c:2504
    [&lt;00000000a0937814&gt;] usb_set_configuration+0xe84/0x1ab0
drivers/usb/core/message.c:2030
    [&lt;00000000e3934741&gt;] generic_probe+0x6a/0xe0 drivers/usb/core/generic.c:210
    [&lt;0000000098ade0f1&gt;] usb_probe_device+0x90/0xd0
drivers/usb/core/driver.c:266
    [&lt;000000007806c118&gt;] really_probe+0x48d/0x8f0 drivers/base/dd.c:551
    [&lt;00000000a3308c3e&gt;] driver_probe_device+0xfc/0x2a0 drivers/base/dd.c:724

Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Reported-by: Kyungtae Kim &lt;kt0755@gmail.com&gt;
Signed-off-by: Zqiang &lt;qiang.zhang@windriver.com&gt;
Link: https://lore.kernel.org/r/20200612035210.20494-1-qiang.zhang@windriver.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: sisusbvga: Change port variable from signed to unsigned</title>
<updated>2020-05-02T15:20:42Z</updated>
<author>
<name>Changming Liu</name>
<email>liu.changm@northeastern.edu</email>
</author>
<published>2020-04-21T03:41:25Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=101c65e5032889e78257e866d90ac7bc9a966d60'/>
<id>urn:sha1:101c65e5032889e78257e866d90ac7bc9a966d60</id>
<content type='text'>
commit 2df7405f79ce1674d73c2786fe1a8727c905d65b upstream.

Change a bunch of arguments of wrapper functions which pass signed
integer to an unsigned integer which might cause undefined behaviors
when sign integer overflow.

Signed-off-by: Changming Liu &lt;liu.changm@northeastern.edu&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/BL0PR06MB45482D71EA822D75A0E60A2EE5D50@BL0PR06MB4548.namprd06.prod.outlook.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>USB: adutux: fix interface sanity check</title>
<updated>2019-12-21T09:35:15Z</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2019-12-10T11:25:59Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c6055b56075ee49876b7e34a4f12aeec810940bb'/>
<id>urn:sha1:c6055b56075ee49876b7e34a4f12aeec810940bb</id>
<content type='text'>
commit 3c11c4bed02b202e278c0f5c319ae435d7fb9815 upstream.

Make sure to use the current alternate setting when verifying the
interface descriptors to avoid binding to an invalid interface.

Failing to do so could cause the driver to misbehave or trigger a WARN()
in usb_submit_urb() that kernels with panic_on_warn set would choke on.

Fixes: 03270634e242 ("USB: Add ADU support for Ontrak ADU devices")
Cc: stable &lt;stable@vger.kernel.org&gt;     # 2.6.19
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Link: https://lore.kernel.org/r/20191210112601.3561-3-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>USB: idmouse: fix interface sanity checks</title>
<updated>2019-12-21T09:35:14Z</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2019-12-10T11:26:00Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1dcb027d9d757cfd6a074afce7621bd90aa835ed'/>
<id>urn:sha1:1dcb027d9d757cfd6a074afce7621bd90aa835ed</id>
<content type='text'>
commit 59920635b89d74b9207ea803d5e91498d39e8b69 upstream.

Make sure to use the current alternate setting when verifying the
interface descriptors to avoid binding to an invalid interface.

Failing to do so could cause the driver to misbehave or trigger a WARN()
in usb_submit_urb() that kernels with panic_on_warn set would choke on.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Link: https://lore.kernel.org/r/20191210112601.3561-4-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

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