Hello,
syzbot found the following issue on:
HEAD commit: c79648372d02 Linux 5.15.189
git tree: linux-5.15.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=15f73f22580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=f3b1215b3cf4119f
dashboard link:
https://syzkaller.appspot.com/bug?extid=59be4801ca23ec452bf4
compiler: Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/fa511d2a8893/disk-c7964837.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/f14b6c77bbb9/vmlinux-c7964837.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/388987ba15c6/bzImage-c7964837.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+59be48...@syzkaller.appspotmail.com
======================================================
WARNING: possible circular locking dependency detected
5.15.189-syzkaller #0 Not tainted
------------------------------------------------------
acpid/3546 is trying to acquire lock:
ffff888054535ee0 (&hdev->ll_open_lock){+.+.}-{3:3}, at: hid_hw_open+0x23/0x160 drivers/hid/hid-core.c:2118
but task is already holding lock:
ffff8880539be2c0 (&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:
-> #2 (&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_interruptible_nested+0x17/0x20 kernel/locking/mutex.c:765
input_register_handle+0x67/0x3a0 drivers/input/input.c:2588
kbd_connect+0xbf/0x130 drivers/tty/vt/keyboard.c:1577
input_attach_handler drivers/input/input.c:1046 [inline]
input_register_device+0xda7/0x1140 drivers/input/input.c:2429
acpi_button_add+0x6ba/0xae0 drivers/acpi/button.c:579
acpi_device_probe+0xa3/0x300 drivers/acpi/bus.c:1013
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
__driver_attach+0x46b/0x670 drivers/base/dd.c:1164
bus_for_each_dev+0x175/0x1e0 drivers/base/bus.c:303
bus_add_driver+0x30a/0x5a0 drivers/base/bus.c:620
driver_register+0x32d/0x430 drivers/base/driver.c:240
do_one_initcall+0x1ee/0x680 init/main.c:1302
do_initcall_level+0x137/0x1f0 init/main.c:1375
do_initcalls+0x4b/0x90 init/main.c:1391
kernel_init_freeable+0x3ce/0x560 init/main.c:1615
kernel_init+0x19/0x1b0 init/main.c:1506
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
-> #1 (input_mutex){+.+.}-{3:3}:
__mutex_lock_common+0x1eb/0x2390 kernel/locking/mutex.c:596
__mutex_lock kernel/locking/mutex.c:729 [inline]
mutex_lock_interruptible_nested+0x17/0x20 kernel/locking/mutex.c:765
input_register_device+0xb66/0x1140 drivers/input/input.c:2422
steam_input_register+0x9b1/0xc80 drivers/hid/hid-steam.c:469
hid_hw_close+0xa5/0xd0 drivers/hid/hid-core.c:2146
drop_ref drivers/hid/hidraw.c:338 [inline]
hidraw_release+0x39d/0x5d0 drivers/hid/hidraw.c:360
__fput+0x234/0x930 fs/file_table.c:311
task_work_run+0x125/0x1a0 kernel/task_work.c:188
tracehook_notify_resume include/linux/tracehook.h:189 [inline]
exit_to_user_mode_loop+0x10f/0x130 kernel/entry/common.c:181
exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:214
__syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline]
syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:307
do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86
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:2118
input_open_device+0x16c/0x2e0 drivers/input/input.c:640
evdev_open_device drivers/input/evdev.c:400 [inline]
evdev_open+0x4b0/0x5b0 drivers/input/evdev.c:487
chrdev_open+0x597/0x670 fs/char_dev.c:414
do_dentry_open+0x7ff/0xf80 fs/open.c:826
do_open fs/namei.c:3608 [inline]
path_openat+0x2682/0x2f30 fs/namei.c:3742
do_filp_open+0x1b3/0x3e0 fs/namei.c:3769
do_sys_openat2+0x142/0x4a0 fs/open.c:1253
do_sys_open fs/open.c:1269 [inline]
__do_sys_openat fs/open.c:1285 [inline]
__se_sys_openat fs/open.c:1280 [inline]
__x64_sys_openat+0x135/0x160 fs/open.c:1280
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:
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 ***
2 locks held by acpid/3546:
#0: ffff88807846e110 (&evdev->mutex){+.+.}-{3:3}, at: evdev_open_device drivers/input/evdev.c:393 [inline]
#0: ffff88807846e110 (&evdev->mutex){+.+.}-{3:3}, at: evdev_open+0x2d2/0x5b0 drivers/input/evdev.c:487
#1: ffff8880539be2c0 (&dev->mutex#2){+.+.}-{3:3}, at: input_open_device+0x4e/0x2e0 drivers/input/input.c:620
stack backtrace:
CPU: 1 PID: 3546 Comm: acpid Not tainted 5.15.189-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/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:2118
input_open_device+0x16c/0x2e0 drivers/input/input.c:640
evdev_open_device drivers/input/evdev.c:400 [inline]
evdev_open+0x4b0/0x5b0 drivers/input/evdev.c:487
chrdev_open+0x597/0x670 fs/char_dev.c:414
do_dentry_open+0x7ff/0xf80 fs/open.c:826
do_open fs/namei.c:3608 [inline]
path_openat+0x2682/0x2f30 fs/namei.c:3742
do_filp_open+0x1b3/0x3e0 fs/namei.c:3769
do_sys_openat2+0x142/0x4a0 fs/open.c:1253
do_sys_open fs/open.c:1269 [inline]
__do_sys_openat fs/open.c:1285 [inline]
__se_sys_openat fs/open.c:1280 [inline]
__x64_sys_openat+0x135/0x160 fs/open.c:1280
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:0x7f8f71dcf407
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:00007ffd2fe08800 EFLAGS: 00000202 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007f8f71d45740 RCX: 00007f8f71dcf407
RDX: 0000000000080800 RSI: 00007ffd2fe08a10 RDI: ffffffffffffff9c
RBP: 00007ffd2fe08a10 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000040
R13: 00007ffd2fe08b10 R14: 0000560a4a0ef7fe R15: 00007ffd2fe08b10
</TASK>
---
This report is generated by a bot. It may contain errors.
See
https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at
syzk...@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup