syzbot


WARNING: bad unlock balance in hub_event

Status: auto-closed as invalid on 2022/01/02 02:55
Reported-by: syzbot+423eaf1efaa99fb8ce96@syzkaller.appspotmail.com
First crash: 383d, last: 378d

Sample crash report:
=====================================
WARNING: bad unlock balance detected!
5.16.0-rc1-next-20211118-syzkaller #0 Not tainted
-------------------------------------
kworker/0:4/10343 is trying to release lock (hcd->address0_mutex) at:
[<ffffffff856171ad>] hub_port_connect drivers/usb/core/hub.c:5402 [inline]
[<ffffffff856171ad>] hub_port_connect_change drivers/usb/core/hub.c:5493 [inline]
[<ffffffff856171ad>] port_event drivers/usb/core/hub.c:5639 [inline]
[<ffffffff856171ad>] hub_event+0x2a9d/0x4450 drivers/usb/core/hub.c:5721
but there are no more locks to release!

other info that might help us debug this:
3 locks held by kworker/0:4/10343:
 #0: ffff888141d82d38 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline]
 #0: ffff888141d82d38 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: arch_atomic_long_set include/linux/atomic/atomic-long.h:41 [inline]
 #0: ffff888141d82d38 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: atomic_long_set include/linux/atomic/atomic-instrumented.h:1198 [inline]
 #0: ffff888141d82d38 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: set_work_data kernel/workqueue.c:635 [inline]
 #0: ffff888141d82d38 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: set_work_pool_and_clear_pending kernel/workqueue.c:662 [inline]
 #0: ffff888141d82d38 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_one_work+0x896/0x1690 kernel/workqueue.c:2269
 #1: ffffc90004ae7db0 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_one_work+0x8ca/0x1690 kernel/workqueue.c:2273
 #2: ffff88801debc220 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:760 [inline]
 #2: ffff88801debc220 (&dev->mutex){....}-{3:3}, at: hub_event+0x1c1/0x4450 drivers/usb/core/hub.c:5667

stack backtrace:
CPU: 0 PID: 10343 Comm: kworker/0:4 Not tainted 5.16.0-rc1-next-20211118-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: usb_hub_wq hub_event
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
 print_unlock_imbalance_bug include/trace/events/lock.h:58 [inline]
 __lock_release kernel/locking/lockdep.c:5316 [inline]
 lock_release.cold+0x34/0x4e kernel/locking/lockdep.c:5657
 __mutex_unlock_slowpath+0x99/0x5e0 kernel/locking/mutex.c:900
 hub_port_connect drivers/usb/core/hub.c:5402 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5493 [inline]
 port_event drivers/usb/core/hub.c:5639 [inline]
 hub_event+0x2a9d/0x4450 drivers/usb/core/hub.c:5721
 process_one_work+0x9b2/0x1690 kernel/workqueue.c:2298
 process_scheduled_works kernel/workqueue.c:2361 [inline]
 worker_thread+0x85c/0x11f0 kernel/workqueue.c:2447
 kthread+0x405/0x4f0 kernel/kthread.c:327
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
 </TASK>

Crashes (19):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-linux-next-kasan-gce-root 2021/11/23 02:54 linux-next 5191249f8803 545ab074 .config log report info WARNING: bad unlock balance in hub_event
ci-upstream-linux-next-kasan-gce-root 2021/11/22 21:53 linux-next 5191249f8803 545ab074 .config log report info WARNING: bad unlock balance in hub_event
ci-upstream-linux-next-kasan-gce-root 2021/11/19 16:09 linux-next 5191249f8803 3a9d0024 .config log report info WARNING: bad unlock balance in hub_event
ci-upstream-linux-next-kasan-gce-root 2021/11/19 15:58 linux-next 5191249f8803 3a9d0024 .config log report info WARNING: bad unlock balance in hub_event
ci-upstream-linux-next-kasan-gce-root 2021/11/19 09:55 linux-next 5191249f8803 31a30fc0 .config log report info WARNING: bad unlock balance in hub_event
ci-upstream-linux-next-kasan-gce-root 2021/11/18 15:56 linux-next 5191249f8803 31a30fc0 .config log report info WARNING: bad unlock balance in hub_event
ci-upstream-linux-next-kasan-gce-root 2021/11/18 14:39 linux-next 5191249f8803 31a30fc0 .config log report info WARNING: bad unlock balance in hub_event
ci-upstream-linux-next-kasan-gce-root 2021/11/18 14:33 linux-next 5191249f8803 31a30fc0 .config log report info WARNING: bad unlock balance in hub_event
ci-upstream-linux-next-kasan-gce-root 2021/11/18 14:18 linux-next 5191249f8803 31a30fc0 .config log report info WARNING: bad unlock balance in hub_event
ci-upstream-linux-next-kasan-gce-root 2021/11/18 12:44 linux-next 5191249f8803 cafff8b6 .config log report info WARNING: bad unlock balance in hub_event
ci-upstream-linux-next-kasan-gce-root 2021/11/18 11:49 linux-next 5191249f8803 cafff8b6 .config log report info WARNING: bad unlock balance in hub_event
ci-upstream-linux-next-kasan-gce-root 2021/11/18 11:41 linux-next 5191249f8803 cafff8b6 .config log report info WARNING: bad unlock balance in hub_event
ci-upstream-linux-next-kasan-gce-root 2021/11/18 10:58 linux-next 5191249f8803 cafff8b6 .config log report info WARNING: bad unlock balance in hub_event
ci-upstream-linux-next-kasan-gce-root 2021/11/18 10:48 linux-next 5191249f8803 cafff8b6 .config log report info WARNING: bad unlock balance in hub_event
ci-upstream-linux-next-kasan-gce-root 2021/11/18 08:19 linux-next 5191249f8803 cafff8b6 .config log report info WARNING: bad unlock balance in hub_event
ci-upstream-linux-next-kasan-gce-root 2021/11/18 07:39 linux-next 5191249f8803 cafff8b6 .config log report info WARNING: bad unlock balance in hub_event
ci-upstream-linux-next-kasan-gce-root 2021/11/18 07:31 linux-next 5191249f8803 cafff8b6 .config log report info WARNING: bad unlock balance in hub_event
ci-upstream-linux-next-kasan-gce-root 2021/11/18 07:16 linux-next 5191249f8803 cafff8b6 .config log report info WARNING: bad unlock balance in hub_event
ci-upstream-linux-next-kasan-gce-root 2021/11/18 05:42 linux-next 5191249f8803 cafff8b6 .config log report info WARNING: bad unlock balance in hub_event
* Struck through repros no longer work on HEAD.