syzbot


possible deadlock in hid_hw_open (3)

Status: upstream: reported on 2025/12/28 07:54
Reported-by: syzbot+ca0bc2efb292ea80411d@syzkaller.appspotmail.com
First crash: 16d, last: 9d07h
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 (2) 4 1 175d 175d 0/3 auto-obsoleted due to no activity on 2025/10/31 06:50
linux-6.1 possible deadlock in hid_hw_open 4 3 57d 58d 0/3 upstream: reported on 2025/11/17 00:02
linux-5.15 possible deadlock in hid_hw_open 4 1 283d 283d 0/3 auto-obsoleted due to no activity on 2025/07/15 00:10
upstream possible deadlock in hid_hw_open input 4 73 343d 513d 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/3546 is trying to acquire lock:
ffff8880613f5ee0 (&hdev->ll_open_lock){+.+.}-{3:3}, at: hid_hw_open+0x23/0x160 drivers/hid/hid-core.c:2127

but task is already holding lock:
ffff888025a1a2c0 (&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+0x1eb/0x2390 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:2132
       hidraw_open+0x28f/0x8b0 drivers/hid/hidraw.c:289
       chrdev_open+0x597/0x670 fs/char_dev.c:414
       do_dentry_open+0x7ff/0xf80 fs/open.c:826
       do_open fs/namei.c:3616 [inline]
       path_openat+0x2682/0x2f30 fs/namei.c:3750
       do_filp_open+0x1b3/0x3e0 fs/namei.c:3777
       do_sys_openat2+0x142/0x4a0 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+0x2c33/0x7c60 kernel/locking/lockdep.c:5012
       lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623
       __mutex_lock_common+0x1eb/0x2390 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:2127
       input_open_device+0x16c/0x2e0 drivers/input/input.c:640
       mousedev_open_device+0xc3/0x150 drivers/input/mousedev.c:430
       mousedev_open+0x2e5/0x4a0 drivers/input/mousedev.c:556
       chrdev_open+0x597/0x670 fs/char_dev.c:414
       do_dentry_open+0x7ff/0xf80 fs/open.c:826
       do_open fs/namei.c:3616 [inline]
       path_openat+0x2682/0x2f30 fs/namei.c:3750
       do_filp_open+0x1b3/0x3e0 fs/namei.c:3777
       do_sys_openat2+0x142/0x4a0 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(&dev->mutex#2);
                               lock(&hdev->ll_open_lock);
                               lock(&dev->mutex#2);
  lock(&hdev->ll_open_lock);

 *** DEADLOCK ***

2 locks held by acpid/3546:
 #0: ffff88806012b158 (&mousedev->mutex#2){+.+.}-{3:3}, at: mousedev_open_device+0x23/0x150 drivers/input/mousedev.c:423
 #1: ffff888025a1a2c0 (&dev->mutex#2){+.+.}-{3:3}, at: input_open_device+0x4e/0x2e0 drivers/input/input.c:620

stack backtrace:
CPU: 0 PID: 3546 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+0x168/0x230 lib/dump_stack.c:106
 check_noncircular+0x274/0x310 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+0x2c33/0x7c60 kernel/locking/lockdep.c:5012
 lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623
 __mutex_lock_common+0x1eb/0x2390 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:2127
 input_open_device+0x16c/0x2e0 drivers/input/input.c:640
 mousedev_open_device+0xc3/0x150 drivers/input/mousedev.c:430
 mousedev_open+0x2e5/0x4a0 drivers/input/mousedev.c:556
 chrdev_open+0x597/0x670 fs/char_dev.c:414
 do_dentry_open+0x7ff/0xf80 fs/open.c:826
 do_open fs/namei.c:3616 [inline]
 path_openat+0x2682/0x2f30 fs/namei.c:3750
 do_filp_open+0x1b3/0x3e0 fs/namei.c:3777
 do_sys_openat2+0x142/0x4a0 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:0x7f9bdc1ea407
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:00007ffcd4d0af50 EFLAGS: 00000202 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007f9bdc160740 RCX: 00007f9bdc1ea407
RDX: 0000000000080800 RSI: 00007ffcd4d0b160 RDI: ffffffffffffff9c
RBP: 00007ffcd4d0b160 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000040
R13: 00007ffcd4d0b260 R14: 00005641cc2787fe R15: 00007ffcd4d0b260
 </TASK>

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/01/04 23:52 linux-5.15.y 68efe5a6c16a d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in hid_hw_open
2026/01/02 03:51 linux-5.15.y 68efe5a6c16a d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in hid_hw_open
2026/01/01 19:47 linux-5.15.y 68efe5a6c16a d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in hid_hw_open
2025/12/28 07:53 linux-5.15.y 68efe5a6c16a d6526ea3 .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.