syzbot


possible deadlock in __input_unregister_device (2)

Status: upstream: reported on 2026/05/30 21:57
Reported-by: syzbot+4203c044742bef36d5b6@syzkaller.appspotmail.com
First crash: 5d02h, last: 5d02h
Similar bugs (4)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 possible deadlock in __input_unregister_device (2) 4 8 132d 158d 0/3 auto-obsoleted due to no activity on 2026/05/03 13:11
linux-5.15 possible deadlock in __input_unregister_device 4 2 390d 455d 0/3 auto-obsoleted due to no activity on 2025/08/18 04:46
linux-6.1 possible deadlock in __input_unregister_device 4 1 455d 455d 0/3 auto-obsoleted due to no activity on 2025/06/14 09:26
upstream possible deadlock in __input_unregister_device input 4 289 472d 662d 0/29 auto-obsoleted due to no activity on 2025/04/28 01:51

Sample crash report:
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz.3.1467/11671 is trying to acquire lock:
ffff8880657d22c0 (&dev->mutex#2){+.+.}-{3:3}, at: input_disconnect_device drivers/input/input.c:757 [inline]
ffff8880657d22c0 (&dev->mutex#2){+.+.}-{3:3}, at: __input_unregister_device+0x31/0x5f0 drivers/input/input.c:2291

but task is already holding lock:
ffff88805c8ade18 (&hdev->ll_open_lock){+.+.}-{3:3}, at: hid_hw_open+0x23/0x160 drivers/hid/hid-core.c:2352

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (&hdev->ll_open_lock){+.+.}-{3:3}:
       __mutex_lock_common kernel/locking/mutex.c:603 [inline]
       __mutex_lock+0x12d/0xaf0 kernel/locking/mutex.c:747
       hid_hw_open+0x23/0x160 drivers/hid/hid-core.c:2352
       input_open_device+0x16c/0x2e0 drivers/input/input.c:650
       kbd_connect+0xe9/0x130 drivers/tty/vt/keyboard.c:1593
       input_attach_handler drivers/input/input.c:1060 [inline]
       input_register_device+0xdfd/0x1310 drivers/input/input.c:2470
       hidinput_connect+0x25cb/0x2f20 drivers/hid/hid-input.c:2350
       hid_connect+0x4ab/0x1970 drivers/hid/hid-core.c:2202
       hid_hw_start+0x99/0x100 drivers/hid/hid-core.c:2315
       hid_device_probe+0x2e6/0x350 drivers/hid/hid-core.c:2650
       call_driver_probe drivers/base/dd.c:-1 [inline]
       really_probe+0x2aa/0xc70 drivers/base/dd.c:639
       __driver_probe_device+0x18c/0x330 drivers/base/dd.c:785
       driver_probe_device+0x4f/0x420 drivers/base/dd.c:815
       __device_attach_driver+0x2c6/0x510 drivers/base/dd.c:943
       bus_for_each_drv+0x184/0x210 drivers/base/bus.c:429
       __device_attach+0x2a8/0x480 drivers/base/dd.c:1015
       bus_probe_device+0xbc/0x1e0 drivers/base/bus.c:489
       device_add+0xa00/0xfb0 drivers/base/core.c:3697
       hid_add_device+0x389/0x530 drivers/hid/hid-core.c:2798
       usbhid_probe+0xc09/0xfe0 drivers/hid/usbhid/hid-core.c:1442
       usb_probe_interface+0x5c5/0xb20 drivers/usb/core/driver.c:396
       call_driver_probe drivers/base/dd.c:-1 [inline]
       really_probe+0x2aa/0xc70 drivers/base/dd.c:639
       __driver_probe_device+0x18c/0x330 drivers/base/dd.c:785
       driver_probe_device+0x4f/0x420 drivers/base/dd.c:815
       __device_attach_driver+0x2c6/0x510 drivers/base/dd.c:943
       bus_for_each_drv+0x184/0x210 drivers/base/bus.c:429
       __device_attach+0x2a8/0x480 drivers/base/dd.c:1015
       bus_probe_device+0xbc/0x1e0 drivers/base/bus.c:489
       device_add+0xa00/0xfb0 drivers/base/core.c:3697
       usb_set_configuration+0x1991/0x1fd0 drivers/usb/core/message.c:2223
       usb_generic_driver_probe+0x89/0x150 drivers/usb/core/generic.c:238
       usb_probe_device+0x139/0x270 drivers/usb/core/driver.c:293
       call_driver_probe drivers/base/dd.c:-1 [inline]
       really_probe+0x2aa/0xc70 drivers/base/dd.c:639
       __driver_probe_device+0x18c/0x330 drivers/base/dd.c:785
       driver_probe_device+0x4f/0x420 drivers/base/dd.c:815
       __device_attach_driver+0x2c6/0x510 drivers/base/dd.c:943
       bus_for_each_drv+0x184/0x210 drivers/base/bus.c:429
       __device_attach+0x2a8/0x480 drivers/base/dd.c:1015
       bus_probe_device+0xbc/0x1e0 drivers/base/bus.c:489
       device_add+0xa00/0xfb0 drivers/base/core.c:3697
       usb_new_device+0xd66/0x1650 drivers/usb/core/hub.c:2659
       hub_port_connect drivers/usb/core/hub.c:5517 [inline]
       hub_port_connect_change drivers/usb/core/hub.c:5657 [inline]
       port_event drivers/usb/core/hub.c:5817 [inline]
       hub_event+0x2dcf/0x5560 drivers/usb/core/hub.c:5899
       process_one_work+0x8a2/0x1160 kernel/workqueue.c:2292
       worker_thread+0xaa2/0x1270 kernel/workqueue.c:2439
       kthread+0x29d/0x330 kernel/kthread.c:376
       ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

-> #0 (&dev->mutex#2){+.+.}-{3:3}:
       check_prev_add kernel/locking/lockdep.c:3090 [inline]
       check_prevs_add kernel/locking/lockdep.c:3209 [inline]
       validate_chain kernel/locking/lockdep.c:3825 [inline]
       __lock_acquire+0x2d07/0x7d10 kernel/locking/lockdep.c:5049
       lock_acquire+0x1bb/0x4a0 kernel/locking/lockdep.c:5662
       __mutex_lock_common kernel/locking/mutex.c:603 [inline]
       __mutex_lock+0x12d/0xaf0 kernel/locking/mutex.c:747
       input_disconnect_device drivers/input/input.c:757 [inline]
       __input_unregister_device+0x31/0x5f0 drivers/input/input.c:2291
       input_unregister_device+0x97/0xf0 drivers/input/input.c:2514
       steam_client_ll_open+0x73/0x90 drivers/hid/hid-steam.c:640
       hid_hw_open+0xdd/0x160 drivers/hid/hid-core.c:2357
       hidraw_open+0x28d/0x8a0 drivers/hid/hidraw.c:294
       chrdev_open+0x5c5/0x6a0 fs/char_dev.c:414
       do_dentry_open+0x7e9/0x10d0 fs/open.c:882
       do_open fs/namei.c:3634 [inline]
       path_openat+0x2635/0x2ee0 fs/namei.c:3791
       do_filp_open+0x1f1/0x430 fs/namei.c:3818
       do_sys_openat2+0x150/0x4b0 fs/open.c:1320
       do_sys_open fs/open.c:1336 [inline]
       __do_sys_openat fs/open.c:1352 [inline]
       __se_sys_openat fs/open.c:1347 [inline]
       __x64_sys_openat+0x135/0x160 fs/open.c:1347
       do_syscall_x64 arch/x86/entry/common.c:46 [inline]
       do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
       entry_SYSCALL_64_after_hwframe+0x68/0xd2

other info that might help us debug this:

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&hdev->ll_open_lock);
                               lock(&dev->mutex#2);
                               lock(&hdev->ll_open_lock);
  lock(&dev->mutex#2);

 *** DEADLOCK ***

2 locks held by syz.3.1467/11671:
 #0: ffffffff8dbb07b0 (minors_rwsem){+.+.}-{3:3}, at: hidraw_open+0x8f/0x8a0 drivers/hid/hidraw.c:280
 #1: ffff88805c8ade18 (&hdev->ll_open_lock){+.+.}-{3:3}, at: hid_hw_open+0x23/0x160 drivers/hid/hid-core.c:2352

stack backtrace:
CPU: 1 PID: 11671 Comm: syz.3.1467 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0x188/0x24e lib/dump_stack.c:106
 check_noncircular+0x296/0x330 kernel/locking/lockdep.c:2170
 check_prev_add kernel/locking/lockdep.c:3090 [inline]
 check_prevs_add kernel/locking/lockdep.c:3209 [inline]
 validate_chain kernel/locking/lockdep.c:3825 [inline]
 __lock_acquire+0x2d07/0x7d10 kernel/locking/lockdep.c:5049
 lock_acquire+0x1bb/0x4a0 kernel/locking/lockdep.c:5662
 __mutex_lock_common kernel/locking/mutex.c:603 [inline]
 __mutex_lock+0x12d/0xaf0 kernel/locking/mutex.c:747
 input_disconnect_device drivers/input/input.c:757 [inline]
 __input_unregister_device+0x31/0x5f0 drivers/input/input.c:2291
 input_unregister_device+0x97/0xf0 drivers/input/input.c:2514
 steam_client_ll_open+0x73/0x90 drivers/hid/hid-steam.c:640
 hid_hw_open+0xdd/0x160 drivers/hid/hid-core.c:2357
 hidraw_open+0x28d/0x8a0 drivers/hid/hidraw.c:294
 chrdev_open+0x5c5/0x6a0 fs/char_dev.c:414
 do_dentry_open+0x7e9/0x10d0 fs/open.c:882
 do_open fs/namei.c:3634 [inline]
 path_openat+0x2635/0x2ee0 fs/namei.c:3791
 do_filp_open+0x1f1/0x430 fs/namei.c:3818
 do_sys_openat2+0x150/0x4b0 fs/open.c:1320
 do_sys_open fs/open.c:1336 [inline]
 __do_sys_openat fs/open.c:1352 [inline]
 __se_sys_openat fs/open.c:1347 [inline]
 __x64_sys_openat+0x135/0x160 fs/open.c:1347
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f247175d68e
Code: 08 0f 85 a5 a8 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 80 00 00 00 00 48 83 ec 08
RSP: 002b:00007f2472579b28 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007f247257a6c0 RCX: 00007f247175d68e
RDX: 0000000000000002 RSI: 00007f2472579c00 RDI: ffffffffffffff9c
RBP: 00007f2472579c00 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: cccccccccccccccd
R13: 00007f2471a16038 R14: 00007f2471a15fa0 R15: 00007ffe18378df8
 </TASK>

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/05/30 21:56 linux-6.1.y dcbcab9d7079 6b4a8443 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __input_unregister_device
* Struck through repros no longer work on HEAD.