possible deadlock in __input_unregister_device (3)

Status: upstream: reported on 2026/09/14 00:53
Reported-by: syzbot+7239bc6cb2b821e4e0b3@syzkaller.appspotmail.com
First crash: 4d23h, last: 4d23h
Similar bugs (5)
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 238d 264d 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 496d 561d 0/3 auto-obsoleted due to no activity on 2025/08/18 04:46
linux-6.1 possible deadlock in __input_unregister_device (2) 4 1 111d 111d 0/3 auto-obsoleted due to no activity on 2026/09/07 21:57
linux-6.1 possible deadlock in __input_unregister_device 4 1 561d 561d 0/3 auto-obsoleted due to no activity on 2025/06/14 09:26
upstream possible deadlock in __input_unregister_device input 4 289 578d 768d 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.4.765/6849 is trying to acquire lock:
ffff88805539c2c0 (&dev->mutex#2){+.+.}-{3:3}, at: input_disconnect_device drivers/input/input.c:748 [inline]
ffff88805539c2c0 (&dev->mutex#2){+.+.}-{3:3}, at: __input_unregister_device+0x2e/0x320 drivers/input/input.c:2278

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

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+0x1e5/0x2400 kernel/locking/mutex.c:596
       __mutex_lock kernel/locking/mutex.c:729 [inline]
       mutex_lock_killable_nested+0x17/0x20 kernel/locking/mutex.c:758
       hid_hw_open+0x23/0x160 drivers/hid/hid-core.c:2164
       input_open_device+0x16d/0x2e0 drivers/input/input.c:640
       kbd_connect+0xe9/0x130 drivers/tty/vt/keyboard.c:1584
       input_attach_handler drivers/input/input.c:1046 [inline]
       input_register_device+0xd26/0x10c0 drivers/input/input.c:2429
       hidinput_connect+0x2455/0x2da0 drivers/hid/hid-input.c:2055
       hid_connect+0x479/0xe30 drivers/hid/hid-core.c:2020
       hid_hw_start+0x99/0x100 drivers/hid/hid-core.c:2127
       ms_probe+0x163/0x400 drivers/hid/hid-microsoft.c:391
       hid_device_probe+0x275/0x360 drivers/hid/hid-core.c:2355
       call_driver_probe drivers/base/dd.c:-1 [inline]
       really_probe+0x276/0xc70 drivers/base/dd.c:595
       __driver_probe_device+0x1f5/0x390 drivers/base/dd.c:775
       driver_probe_device+0x4f/0x420 drivers/base/dd.c:805
       __device_attach_driver+0x2b0/0x500 drivers/base/dd.c:927
       bus_for_each_drv+0x184/0x210 drivers/base/bus.c:429
       __device_attach+0x2a7/0x480 drivers/base/dd.c:999
       bus_probe_device+0xba/0x1d0 drivers/base/bus.c:489
       device_add+0xbcf/0x1050 drivers/base/core.c:3427
       hid_add_device+0x361/0x500 drivers/hid/hid-core.c:2507
       usbhid_probe+0xbc5/0xf50 drivers/hid/usbhid/hid-core.c:1442
       usb_probe_interface+0x5be/0xae0 drivers/usb/core/driver.c:396
       call_driver_probe drivers/base/dd.c:-1 [inline]
       really_probe+0x276/0xc70 drivers/base/dd.c:595
       __driver_probe_device+0x1f5/0x390 drivers/base/dd.c:775
       driver_probe_device+0x4f/0x420 drivers/base/dd.c:805
       __device_attach_driver+0x2b0/0x500 drivers/base/dd.c:927
       bus_for_each_drv+0x184/0x210 drivers/base/bus.c:429
       __device_attach+0x2a7/0x480 drivers/base/dd.c:999
       bus_probe_device+0xba/0x1d0 drivers/base/bus.c:489
       device_add+0xbcf/0x1050 drivers/base/core.c:3427
       usb_set_configuration+0x19d5/0x2030 drivers/usb/core/message.c:2223
       usb_generic_driver_probe+0x89/0x150 drivers/usb/core/generic.c:238
       usb_probe_device+0x126/0x250 drivers/usb/core/driver.c:293
       call_driver_probe drivers/base/dd.c:-1 [inline]
       really_probe+0x276/0xc70 drivers/base/dd.c:595
       __driver_probe_device+0x1f5/0x390 drivers/base/dd.c:775
       driver_probe_device+0x4f/0x420 drivers/base/dd.c:805
       __device_attach_driver+0x2b0/0x500 drivers/base/dd.c:927
       bus_for_each_drv+0x184/0x210 drivers/base/bus.c:429
       __device_attach+0x2a7/0x480 drivers/base/dd.c:999
       bus_probe_device+0xba/0x1d0 drivers/base/bus.c:489
       device_add+0xbcf/0x1050 drivers/base/core.c:3427
       usb_new_device+0x9f6/0x15d0 drivers/usb/core/hub.c:2637
       hub_port_connect drivers/usb/core/hub.c:5502 [inline]
       hub_port_connect_change drivers/usb/core/hub.c:5642 [inline]
       port_event drivers/usb/core/hub.c:5804 [inline]
       hub_event+0x2b8d/0x5260 drivers/usb/core/hub.c:5886
       process_one_work+0x867/0xff0 kernel/workqueue.c:2310
       worker_thread+0xad7/0x12a0 kernel/workqueue.c:2457
       kthread+0x42e/0x520 kernel/kthread.c:334
       ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287

-> #0 (&dev->mutex#2){+.+.}-{3:3}:
       check_prev_add kernel/locking/lockdep.c:3053 [inline]
       check_prevs_add kernel/locking/lockdep.c:3172 [inline]
       validate_chain kernel/locking/lockdep.c:3788 [inline]
       __lock_acquire+0x2c66/0x7b50 kernel/locking/lockdep.c:5012
       lock_acquire+0x19e/0x400 kernel/locking/lockdep.c:5623
       __mutex_lock_common+0x1e5/0x2400 kernel/locking/mutex.c:596
       __mutex_lock kernel/locking/mutex.c:729 [inline]
       mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743
       input_disconnect_device drivers/input/input.c:748 [inline]
       __input_unregister_device+0x2e/0x320 drivers/input/input.c:2278
       input_unregister_device+0x97/0xf0 drivers/input/input.c:2473
       steam_client_ll_open+0x73/0x90 drivers/hid/hid-steam.c:640
       hid_hw_open+0xdd/0x160 drivers/hid/hid-core.c:2169
       hidraw_open+0x464/0x8c0 drivers/hid/hidraw.c:289
       chrdev_open+0x585/0x5f0 fs/char_dev.c:414
       do_dentry_open+0x7f7/0xf90 fs/open.c:826
       do_open fs/namei.c:3659 [inline]
       path_openat+0x2718/0x2fb0 fs/namei.c:3793
       do_filp_open+0x1df/0x400 fs/namei.c:3820
       do_sys_openat2+0x14b/0x500 fs/open.c:1255
       do_sys_open fs/open.c:1271 [inline]
       __do_sys_openat fs/open.c:1287 [inline]
       __se_sys_openat fs/open.c:1282 [inline]
       __x64_sys_openat+0x135/0x160 fs/open.c:1282
       do_syscall_x64 arch/x86/entry/common.c:50 [inline]
       do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
       entry_SYSCALL_64_after_hwframe+0x66/0xd0

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.4.765/6849:
 #0: ffffffff8d2c6bc8 (minors_lock){+.+.}-{3:3}, at: hidraw_open+0x98/0x8c0 drivers/hid/hidraw.c:275
 #1: ffff8880556fdee8 (&hdev->ll_open_lock){+.+.}-{3:3}, at: hid_hw_open+0x23/0x160 drivers/hid/hid-core.c:2164

stack backtrace:
CPU: 1 PID: 6849 Comm: syz.4.765 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106
 check_noncircular+0x296/0x330 kernel/locking/lockdep.c:2133
 check_prev_add kernel/locking/lockdep.c:3053 [inline]
 check_prevs_add kernel/locking/lockdep.c:3172 [inline]
 validate_chain kernel/locking/lockdep.c:3788 [inline]
 __lock_acquire+0x2c66/0x7b50 kernel/locking/lockdep.c:5012
 lock_acquire+0x19e/0x400 kernel/locking/lockdep.c:5623
 __mutex_lock_common+0x1e5/0x2400 kernel/locking/mutex.c:596
 __mutex_lock kernel/locking/mutex.c:729 [inline]
 mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743
 input_disconnect_device drivers/input/input.c:748 [inline]
 __input_unregister_device+0x2e/0x320 drivers/input/input.c:2278
 input_unregister_device+0x97/0xf0 drivers/input/input.c:2473
 steam_client_ll_open+0x73/0x90 drivers/hid/hid-steam.c:640
 hid_hw_open+0xdd/0x160 drivers/hid/hid-core.c:2169
 hidraw_open+0x464/0x8c0 drivers/hid/hidraw.c:289
 chrdev_open+0x585/0x5f0 fs/char_dev.c:414
 do_dentry_open+0x7f7/0xf90 fs/open.c:826
 do_open fs/namei.c:3659 [inline]
 path_openat+0x2718/0x2fb0 fs/namei.c:3793
 do_filp_open+0x1df/0x400 fs/namei.c:3820
 do_sys_openat2+0x14b/0x500 fs/open.c:1255
 do_sys_open fs/open.c:1271 [inline]
 __do_sys_openat fs/open.c:1287 [inline]
 __se_sys_openat fs/open.c:1282 [inline]
 __x64_sys_openat+0x135/0x160 fs/open.c:1282
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f543680598e
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:00007f5434a5ab28 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007f5434a5b6c0 RCX: 00007f543680598e
RDX: 0000000000000002 RSI: 00007f5434a5ac00 RDI: ffffffffffffff9c
RBP: 00007f5434a5ac00 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: cccccccccccccccd
R13: 00007f5436acd218 R14: 00007f5436acd180 R15: 00007ffe479aad58
 </TASK>

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/09/14 00:52 linux-5.15.y 0996e0926f6b 70a60e12 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in __input_unregister_device
* Struck through repros no longer work on HEAD.