<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/usb/misc, branch v5.4.138</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.4.138</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.4.138'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2021-06-03T06:59:04Z</updated>
<entry>
<title>USB: trancevibrator: fix control-request direction</title>
<updated>2021-06-03T06:59:04Z</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2021-05-21T13:31:09Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=84af0c28ed1b0b6156b36854716e68d6a99fab9e'/>
<id>urn:sha1:84af0c28ed1b0b6156b36854716e68d6a99fab9e</id>
<content type='text'>
commit 746e4acf87bcacf1406e05ef24a0b7139147c63e upstream.

The direction of the pipe argument must match the request-type direction
bit or control requests may fail depending on the host-controller-driver
implementation.

Fix the set-speed request which erroneously used USB_DIR_IN and update
the default timeout argument to match (same value).

Fixes: 5638e4d92e77 ("USB: add PlayStation 2 Trance Vibrator driver")
Cc: stable@vger.kernel.org      # 2.6.19
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Link: https://lore.kernel.org/r/20210521133109.17396-1-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>misc/uss720: fix memory leak in uss720_probe</title>
<updated>2021-06-03T06:59:03Z</updated>
<author>
<name>Dongliang Mu</name>
<email>mudongliangabcd@gmail.com</email>
</author>
<published>2021-05-14T12:43:48Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=36b5ff1db1a4ef4fdbc2bae364344279f033ad88'/>
<id>urn:sha1:36b5ff1db1a4ef4fdbc2bae364344279f033ad88</id>
<content type='text'>
commit dcb4b8ad6a448532d8b681b5d1a7036210b622de upstream.

uss720_probe forgets to decrease the refcount of usbdev in uss720_probe.
Fix this by decreasing the refcount of usbdev by usb_put_dev.

BUG: memory leak
unreferenced object 0xffff888101113800 (size 2048):
  comm "kworker/0:1", pid 7, jiffies 4294956777 (age 28.870s)
  hex dump (first 32 bytes):
    ff ff ff ff 31 00 00 00 00 00 00 00 00 00 00 00  ....1...........
    00 00 00 00 00 00 00 00 00 00 00 00 03 00 00 00  ................
  backtrace:
    [&lt;ffffffff82b8e822&gt;] kmalloc include/linux/slab.h:554 [inline]
    [&lt;ffffffff82b8e822&gt;] kzalloc include/linux/slab.h:684 [inline]
    [&lt;ffffffff82b8e822&gt;] usb_alloc_dev+0x32/0x450 drivers/usb/core/usb.c:582
    [&lt;ffffffff82b98441&gt;] hub_port_connect drivers/usb/core/hub.c:5129 [inline]
    [&lt;ffffffff82b98441&gt;] hub_port_connect_change drivers/usb/core/hub.c:5363 [inline]
    [&lt;ffffffff82b98441&gt;] port_event drivers/usb/core/hub.c:5509 [inline]
    [&lt;ffffffff82b98441&gt;] hub_event+0x1171/0x20c0 drivers/usb/core/hub.c:5591
    [&lt;ffffffff81259229&gt;] process_one_work+0x2c9/0x600 kernel/workqueue.c:2275
    [&lt;ffffffff81259b19&gt;] worker_thread+0x59/0x5d0 kernel/workqueue.c:2421
    [&lt;ffffffff81261228&gt;] kthread+0x178/0x1b0 kernel/kthread.c:292
    [&lt;ffffffff8100227f&gt;] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294

Fixes: 0f36163d3abe ("[PATCH] usb: fix uss720 schedule with interrupts off")
Cc: stable &lt;stable@vger.kernel.org&gt;
Reported-by: syzbot+636c58f40a86b4a879e7@syzkaller.appspotmail.com
Signed-off-by: Dongliang Mu &lt;mudongliangabcd@gmail.com&gt;
Link: https://lore.kernel.org/r/20210514124348.6587-1-mudongliangabcd@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: yurex: fix control-URB timeout handling</title>
<updated>2021-01-12T19:16:20Z</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=41f15da2abd9ccbd3181db632b6bd2b5c606aabf'/>
<id>urn:sha1:41f15da2abd9ccbd3181db632b6bd2b5c606aabf</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-21T12:27:06Z</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=c94a31c19225530482eed6ea6077028908549aa3'/>
<id>urn:sha1:c94a31c19225530482eed6ea6077028908549aa3</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-05T10:43:17Z</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=16b9e40d2989871df227d032af7f9a79bb1556bd'/>
<id>urn:sha1:16b9e40d2989871df227d032af7f9a79bb1556bd</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:27:07Z</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=ad0bc424fc0ac112d8726e4f7584eb2e2e8904a5'/>
<id>urn:sha1:ad0bc424fc0ac112d8726e4f7584eb2e2e8904a5</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:27:02Z</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=db1bb352cc08d5f148f8caf4efe2ac1590bb2264'/>
<id>urn:sha1:db1bb352cc08d5f148f8caf4efe2ac1590bb2264</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:26:48Z</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=7aac56d8b0eea8c6c8191dfa86138ce498e3b373'/>
<id>urn:sha1:7aac56d8b0eea8c6c8191dfa86138ce498e3b373</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: iowarrior: fix up report size handling for some devices</title>
<updated>2020-08-11T13:33:32Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2020-07-26T09:49:39Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7173ac5c07bb59d9e2bd153a3ffcdf3ae0cffad8'/>
<id>urn:sha1:7173ac5c07bb59d9e2bd153a3ffcdf3ae0cffad8</id>
<content type='text'>
commit 17a82716587e9d7c3b246a789add490b2b5dcab6 upstream.

In previous patches that added support for new iowarrior devices, the
handling of the report size was not done correct.

Fix that up and update the copyright date for the driver

Reworked from an original patch written by Christoph Jung.

Fixes: bab5417f5f01 ("USB: misc: iowarrior: add support for the 100 device")
Fixes: 5f6f8da2d7b5 ("USB: misc: iowarrior: add support for the 28 and 28L devices")
Fixes: 461d8deb26a7 ("USB: misc: iowarrior: add support for 2 OEMed devices")
Cc: stable &lt;stable@kernel.org&gt;
Reported-by: Christoph Jung &lt;jung@codemercs.com&gt;
Link: https://lore.kernel.org/r/20200726094939.1268978-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: usbtest: fix missing kfree(dev-&gt;buf) in usbtest_disconnect</title>
<updated>2020-07-09T07:37:50Z</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=3dca0a299ff43204a69c9a7a00ce2b3e7ab3088c'/>
<id>urn:sha1:3dca0a299ff43204a69c9a7a00ce2b3e7ab3088c</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>
</feed>
