syzbot


possible deadlock in hid_hw_open (4)

Status: upstream: reported on 2026/05/14 15:22
Reported-by: syzbot+c942bf8149406836b952@syzkaller.appspotmail.com
First crash: 3d00h, last: 3d00h
Similar bugs (6)
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 132d 140d 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 298d 298d 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 119d 181d 0/3 auto-obsoleted due to no activity on 2026/04/27 21:17
linux-6.1 possible deadlock in hid_hw_open (2) 4 1 4d23h 4d23h 0/3 upstream: reported on 2026/05/12 16:05
linux-5.15 possible deadlock in hid_hw_open 4 1 406d 406d 0/3 auto-obsoleted due to no activity on 2025/07/15 00:10
upstream possible deadlock in hid_hw_open input 4 73 467d 637d 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.1/usb2/2-1/2-1:0.0/0003:0926:3333.0004/input/input7
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
kworker/1:2/1113 is trying to acquire lock:
ffff88805a0c9ee0 (&hdev->ll_open_lock){+.+.}-{3:3}, at: hid_hw_open+0x23/0x160 drivers/hid/hid-core.c:2132

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

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (&dev->mutex#2){+.+.}-{3:3}:
       __mutex_lock_common+0x1e3/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:2137
       hidraw_open+0x28f/0x8b0 drivers/hid/hidraw.c:289
       chrdev_open+0x5c5/0x6a0 fs/char_dev.c:414
       do_dentry_open+0x7ff/0xf80 fs/open.c:826
       do_open fs/namei.c:3616 [inline]
       path_openat+0x26f5/0x2fa0 fs/namei.c:3750
       do_filp_open+0x1e2/0x410 fs/namei.c:3777
       do_sys_openat2+0x150/0x4b0 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

-> #0 (&hdev->ll_open_lock){+.+.}-{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+0x2c42/0x7d10 kernel/locking/lockdep.c:5012
       lock_acquire+0x19e/0x400 kernel/locking/lockdep.c:5623
       __mutex_lock_common+0x1e3/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:2132
       input_open_device+0x16c/0x2e0 drivers/input/input.c:640
       kbd_connect+0xe9/0x130 drivers/tty/vt/keyboard.c:1581
       input_attach_handler drivers/input/input.c:1046 [inline]
       input_register_device+0xda7/0x1140 drivers/input/input.c:2429
       hidinput_connect+0x2440/0x2d90 drivers/hid/hid-input.c:2046
       hid_connect+0x46a/0xe10 drivers/hid/hid-core.c:1988
       hid_hw_start+0x99/0x100 drivers/hid/hid-core.c:2095
       hid_device_probe+0x2ea/0x360 drivers/hid/hid-core.c:2327
       call_driver_probe drivers/base/dd.c:-1 [inline]
       really_probe+0x284/0xc80 drivers/base/dd.c:595
       __driver_probe_device+0x18c/0x330 drivers/base/dd.c:755
       driver_probe_device+0x4f/0x420 drivers/base/dd.c:785
       __device_attach_driver+0x2b0/0x500 drivers/base/dd.c:907
       bus_for_each_drv+0x184/0x210 drivers/base/bus.c:429
       __device_attach+0x2a8/0x480 drivers/base/dd.c:979
       bus_probe_device+0xbc/0x1e0 drivers/base/bus.c:489
       device_add+0xa00/0xfb0 drivers/base/core.c:3412
       hid_add_device+0x389/0x530 drivers/hid/hid-core.c:2475
       usbhid_probe+0xb92/0xf40 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+0x284/0xc80 drivers/base/dd.c:595
       __driver_probe_device+0x18c/0x330 drivers/base/dd.c:755
       driver_probe_device+0x4f/0x420 drivers/base/dd.c:785
       __device_attach_driver+0x2b0/0x500 drivers/base/dd.c:907
       bus_for_each_drv+0x184/0x210 drivers/base/bus.c:429
       __device_attach+0x2a8/0x480 drivers/base/dd.c:979
       bus_probe_device+0xbc/0x1e0 drivers/base/bus.c:489
       device_add+0xa00/0xfb0 drivers/base/core.c:3412
       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+0x284/0xc80 drivers/base/dd.c:595
       __driver_probe_device+0x18c/0x330 drivers/base/dd.c:755
       driver_probe_device+0x4f/0x420 drivers/base/dd.c:785
       __device_attach_driver+0x2b0/0x500 drivers/base/dd.c:907
       bus_for_each_drv+0x184/0x210 drivers/base/bus.c:429
       __device_attach+0x2a8/0x480 drivers/base/dd.c:979
       bus_probe_device+0xbc/0x1e0 drivers/base/bus.c:489
       device_add+0xa00/0xfb0 drivers/base/core.c:3412
       usb_new_device+0xd65/0x1660 drivers/usb/core/hub.c:2632
       hub_port_connect drivers/usb/core/hub.c:5497 [inline]
       hub_port_connect_change drivers/usb/core/hub.c:5637 [inline]
       port_event drivers/usb/core/hub.c:5799 [inline]
       hub_event+0x2e4a/0x55e0 drivers/usb/core/hub.c:5881
       process_one_work+0x85f/0x1010 kernel/workqueue.c:2310
       worker_thread+0xaa6/0x1290 kernel/workqueue.c:2457
       kthread+0x436/0x520 kernel/kthread.c:334
       ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287

other info that might help us debug this:

 Possible unsafe locking scenario:

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

 *** DEADLOCK ***

8 locks held by kworker/1:2/1113:
 #0: ffff88801c044538 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_one_work+0x761/0x1010 kernel/workqueue.c:-1
 #1: ffffc90004b37d00 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_one_work+0x79f/0x1010 kernel/workqueue.c:2285
 #2: ffff88814800c220 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:764 [inline]
 #2: ffff88814800c220 (&dev->mutex){....}-{3:3}, at: hub_event+0x19f/0x55e0 drivers/usb/core/hub.c:5827
 #3: ffff88801f523220 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:764 [inline]
 #3: ffff88801f523220 (&dev->mutex){....}-{3:3}, at: __device_attach+0x85/0x480 drivers/base/dd.c:954
 #4: ffff888060e1a1a8 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:764 [inline]
 #4: ffff888060e1a1a8 (&dev->mutex){....}-{3:3}, at: __device_attach+0x85/0x480 drivers/base/dd.c:954
 #5: ffff88805a0c9ab0 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:764 [inline]
 #5: ffff88805a0c9ab0 (&dev->mutex){....}-{3:3}, at: __device_attach+0x85/0x480 drivers/base/dd.c:954
 #6: ffffffff8cf465e8 (input_mutex){+.+.}-{3:3}, at: input_register_device+0xb66/0x1140 drivers/input/input.c:2422
 #7: ffff888060f562c0 (&dev->mutex#2){+.+.}-{3:3}, at: input_open_device+0x4e/0x2e0 drivers/input/input.c:620

stack backtrace:
CPU: 1 PID: 1113 Comm: kworker/1:2 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/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+0x2c42/0x7d10 kernel/locking/lockdep.c:5012
 lock_acquire+0x19e/0x400 kernel/locking/lockdep.c:5623
 __mutex_lock_common+0x1e3/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:2132
 input_open_device+0x16c/0x2e0 drivers/input/input.c:640
 kbd_connect+0xe9/0x130 drivers/tty/vt/keyboard.c:1581
 input_attach_handler drivers/input/input.c:1046 [inline]
 input_register_device+0xda7/0x1140 drivers/input/input.c:2429
 hidinput_connect+0x2440/0x2d90 drivers/hid/hid-input.c:2046
 hid_connect+0x46a/0xe10 drivers/hid/hid-core.c:1988
 hid_hw_start+0x99/0x100 drivers/hid/hid-core.c:2095
 hid_device_probe+0x2ea/0x360 drivers/hid/hid-core.c:2327
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x284/0xc80 drivers/base/dd.c:595
 __driver_probe_device+0x18c/0x330 drivers/base/dd.c:755
 driver_probe_device+0x4f/0x420 drivers/base/dd.c:785
 __device_attach_driver+0x2b0/0x500 drivers/base/dd.c:907
 bus_for_each_drv+0x184/0x210 drivers/base/bus.c:429
 __device_attach+0x2a8/0x480 drivers/base/dd.c:979
 bus_probe_device+0xbc/0x1e0 drivers/base/bus.c:489
 device_add+0xa00/0xfb0 drivers/base/core.c:3412
 hid_add_device+0x389/0x530 drivers/hid/hid-core.c:2475
 usbhid_probe+0xb92/0xf40 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+0x284/0xc80 drivers/base/dd.c:595
 __driver_probe_device+0x18c/0x330 drivers/base/dd.c:755
 driver_probe_device+0x4f/0x420 drivers/base/dd.c:785
 __device_attach_driver+0x2b0/0x500 drivers/base/dd.c:907
 bus_for_each_drv+0x184/0x210 drivers/base/bus.c:429
 __device_attach+0x2a8/0x480 drivers/base/dd.c:979
 bus_probe_device+0xbc/0x1e0 drivers/base/bus.c:489
 device_add+0xa00/0xfb0 drivers/base/core.c:3412
 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+0x284/0xc80 drivers/base/dd.c:595
 __driver_probe_device+0x18c/0x330 drivers/base/dd.c:755
 driver_probe_device+0x4f/0x420 drivers/base/dd.c:785
 __device_attach_driver+0x2b0/0x500 drivers/base/dd.c:907
 bus_for_each_drv+0x184/0x210 drivers/base/bus.c:429
 __device_attach+0x2a8/0x480 drivers/base/dd.c:979
 bus_probe_device+0xbc/0x1e0 drivers/base/bus.c:489
 device_add+0xa00/0xfb0 drivers/base/core.c:3412
 usb_new_device+0xd65/0x1660 drivers/usb/core/hub.c:2632
 hub_port_connect drivers/usb/core/hub.c:5497 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5637 [inline]
 port_event drivers/usb/core/hub.c:5799 [inline]
 hub_event+0x2e4a/0x55e0 drivers/usb/core/hub.c:5881
 process_one_work+0x85f/0x1010 kernel/workqueue.c:2310
 worker_thread+0xaa6/0x1290 kernel/workqueue.c:2457
 kthread+0x436/0x520 kernel/kthread.c:334
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
 </TASK>
keytouch 0003:0926:3333.0004: input,hidraw0: USB HID v0.00 Keyboard [HID 0926:3333] on usb-dummy_hcd.1-1/input0
usb 2-1: USB disconnect, device number 3

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