syzbot


possible deadlock in hid_hw_open

Status: upstream: reported on 2025/11/17 00:02
Reported-by: syzbot+5b561352f6fb49fc5a88@syzkaller.appspotmail.com
First crash: 72d, last: 10d
Similar bugs (4)
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 23d 31d 0/3 upstream: reported on 2025/12/28 07:54
linux-5.15 possible deadlock in hid_hw_open (2) 4 1 189d 189d 0/3 auto-obsoleted due to no activity on 2025/10/31 06:50
linux-5.15 possible deadlock in hid_hw_open 4 1 297d 297d 0/3 auto-obsoleted due to no activity on 2025/07/15 00:10
upstream possible deadlock in hid_hw_open input 4 73 358d 528d 0/29 auto-obsoleted due to no activity on 2025/04/15 13:39

Sample crash report:
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
acpid/3623 is trying to acquire lock:
ffff8880279ede18 (&hdev->ll_open_lock){+.+.}-{3:3}, at: hid_hw_open+0x23/0x160 drivers/hid/hid-core.c:2352

but task is already holding lock:
ffff88805834f2c0 (&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:

-> #1 (&dev->mutex#2){+.+.}-{3:3}:
       __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

-> #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
       evdev_open_device drivers/input/evdev.c:400 [inline]
       evdev_open+0x4b0/0x5b0 drivers/input/evdev.c:487
       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(&dev->mutex#2);
                               lock(&hdev->ll_open_lock);
                               lock(&dev->mutex#2);
  lock(&hdev->ll_open_lock);

 *** DEADLOCK ***

2 locks held by acpid/3623:
 #0: ffff88805834e110 (&evdev->mutex){+.+.}-{3:3}, at: evdev_open_device drivers/input/evdev.c:393 [inline]
 #0: ffff88805834e110 (&evdev->mutex){+.+.}-{3:3}, at: evdev_open+0x2d2/0x5b0 drivers/input/evdev.c:487
 #1: ffff88805834f2c0 (&dev->mutex#2){+.+.}-{3:3}, at: input_open_device+0x4e/0x2e0 drivers/input/input.c:630

stack backtrace:
CPU: 0 PID: 3623 Comm: acpid Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
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
 evdev_open_device drivers/input/evdev.c:400 [inline]
 evdev_open+0x4b0/0x5b0 drivers/input/evdev.c:487
 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:0x7f683e721407
Code: 48 89 fa 4c 89 df e8 38 aa 00 00 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 1a 5b c3 0f 1f 84 00 00 00 00 00 48 8b 44 24 10 0f 05 <5b> c3 0f 1f 80 00 00 00 00 83 e2 39 83 fa 08 75 de e8 23 ff ff ff
RSP: 002b:00007ffc583a4870 EFLAGS: 00000202 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007f683e697740 RCX: 00007f683e721407
RDX: 0000000000080800 RSI: 00007ffc583a4a80 RDI: ffffffffffffff9c
RBP: 00007ffc583a4a80 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000040
R13: 00007ffc583a4b80 R14: 000056354c2667fe R15: 00007ffc583a4b80
 </TASK>

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/01/17 21:16 linux-6.1.y cd9b81672742 20d37d28 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hid_hw_open
2025/11/17 21:13 linux-6.1.y f6e38ae624cf ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hid_hw_open
2025/11/17 21:12 linux-6.1.y f6e38ae624cf ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hid_hw_open
2025/11/17 00:02 linux-6.1.y f6e38ae624cf f7988ea4 .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.