syzbot


possible deadlock in hid_hw_open (2)

Status: upstream: reported on 2026/05/12 16:05
Reported-by: syzbot+c01c268f4082e40ce80f@syzkaller.appspotmail.com
First crash: 3h47m, last: 3h47m
Similar bugs (5)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 possible deadlock in hid_hw_open (3) 4 4 127d 135d 0/3 auto-obsoleted due to no activity on 2026/04/14 23:53
linux-5.15 possible deadlock in hid_hw_open (2) 4 1 293d 293d 0/3 auto-obsoleted due to no activity on 2025/10/31 06:50
linux-6.1 possible deadlock in hid_hw_open 4 4 114d 176d 0/3 auto-obsoleted due to no activity on 2026/04/27 21:17
linux-5.15 possible deadlock in hid_hw_open 4 1 401d 401d 0/3 auto-obsoleted due to no activity on 2025/07/15 00:10
upstream possible deadlock in hid_hw_open input 4 73 462d 632d 0/29 auto-obsoleted due to no activity on 2025/04/15 13:39

Sample crash report:
input: HID 0926:3333 as /devices/platform/dummy_hcd.5/usb6/6-1/6-1:0.0/0003:0926:3333.0007/input/input8
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
kworker/1:1/26 is trying to acquire lock:
ffff888058411e18 (&hdev->ll_open_lock){+.+.}-{3:3}, at: hid_hw_open+0x23/0x160 drivers/hid/hid-core.c:2352

but task is already holding lock:
ffff888054edb2c0 (&dev->mutex#2){+.+.}-{3:3}, at: input_open_device+0x4e/0x2e0 drivers/input/input.c:630

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #2 (&dev->mutex#2){+.+.}-{3:3}:
       __mutex_lock_common kernel/locking/mutex.c:603 [inline]
       __mutex_lock+0x12d/0xaf0 kernel/locking/mutex.c:747
       input_register_handle+0x67/0x3a0 drivers/input/input.c:2629
       kbd_connect+0xbf/0x130 drivers/tty/vt/keyboard.c:1589
       input_attach_handler drivers/input/input.c:1060 [inline]
       input_register_device+0xdfd/0x1310 drivers/input/input.c:2470
       acpi_button_add+0x6b7/0xae0 drivers/acpi/button.c:570
       acpi_device_probe+0xa3/0x300 drivers/acpi/bus.c:1023
       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
       __driver_attach+0x44a/0x6e0 drivers/base/dd.c:1201
       bus_for_each_dev+0x182/0x1f0 drivers/base/bus.c:303
       bus_add_driver+0x30a/0x5a0 drivers/base/bus.c:620
       driver_register+0x32d/0x430 drivers/base/driver.c:246
       do_one_initcall+0x26a/0x840 init/main.c:1310
       do_initcall_level+0x137/0x1e4 init/main.c:1383
       do_initcalls+0x4b/0x8a init/main.c:1399
       kernel_init_freeable+0x415/0x5be init/main.c:1638
       kernel_init+0x19/0x1b0 init/main.c:1526
       ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

-> #1 (input_mutex){+.+.}-{3:3}:
       __mutex_lock_common kernel/locking/mutex.c:603 [inline]
       __mutex_lock+0x12d/0xaf0 kernel/locking/mutex.c:747
       input_register_device+0xbc6/0x1310 drivers/input/input.c:2463
       steam_input_register+0x9df/0xcb0 drivers/hid/hid-steam.c:469
       hid_hw_close+0xa5/0xd0 drivers/hid/hid-core.c:2380
       drop_ref drivers/hid/hidraw.c:343 [inline]
       hidraw_release+0x4c3/0x750 drivers/hid/hidraw.c:367
       __fput+0x22c/0x920 fs/file_table.c:320
       task_work_run+0x1d0/0x260 kernel/task_work.c:203
       exit_task_work include/linux/task_work.h:39 [inline]
       do_exit+0x982/0x2480 kernel/exit.c:880
       do_group_exit+0x217/0x2d0 kernel/exit.c:1022
       get_signal+0x1272/0x1350 kernel/signal.c:2871
       arch_do_signal_or_restart+0xc4/0x1350 arch/x86/kernel/signal.c:871
       exit_to_user_mode_loop+0x70/0x110 kernel/entry/common.c:174
       exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:210
       __syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline]
       syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:303
       do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:82
       entry_SYSCALL_64_after_hwframe+0x68/0xd2

-> #0 (&hdev->ll_open_lock){+.+.}-{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
       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

other info that might help us debug this:

Chain exists of:
  &hdev->ll_open_lock --> input_mutex --> &dev->mutex#2

 Possible unsafe locking scenario:

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

 *** DEADLOCK ***

8 locks held by kworker/1:1/26:
 #0: ffff88814529f138 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_one_work+0x7b0/0x1160 kernel/workqueue.c:2267
 #1: ffffc90000a1fd00 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_one_work+0x7b0/0x1160 kernel/workqueue.c:2267
 #2: ffff8880278d0190 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:840 [inline]
 #2: ffff8880278d0190 (&dev->mutex){....}-{3:3}, at: hub_event+0x19f/0x5560 drivers/usb/core/hub.c:5845
 #3: ffff88805a260190 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:840 [inline]
 #3: ffff88805a260190 (&dev->mutex){....}-{3:3}, at: __device_attach+0x85/0x480 drivers/base/dd.c:990
 #4: ffff888054ed9118 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:840 [inline]
 #4: ffff888054ed9118 (&dev->mutex){....}-{3:3}, at: __device_attach+0x85/0x480 drivers/base/dd.c:990
 #5: ffff888058411a20 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:840 [inline]
 #5: ffff888058411a20 (&dev->mutex){....}-{3:3}, at: __device_attach+0x85/0x480 drivers/base/dd.c:990
 #6: ffffffff8d832fa8 (input_mutex){+.+.}-{3:3}, at: input_register_device+0xbc6/0x1310 drivers/input/input.c:2463
 #7: ffff888054edb2c0 (&dev->mutex#2){+.+.}-{3:3}, at: input_open_device+0x4e/0x2e0 drivers/input/input.c:630

stack backtrace:
CPU: 1 PID: 26 Comm: kworker/1:1 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026
Workqueue: usb_hub_wq hub_event
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
 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
 </TASK>
keytouch 0003:0926:3333.0007: input,hidraw0: USB HID v0.00 Keyboard [HID 0926:3333] on usb-dummy_hcd.5-1/input0

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