Hello,
syzbot found the following issue on:
HEAD commit: c16c81c81336 Linux 5.15.178
git tree: linux-5.15.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=11367da8580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=d302c69e93fb6774
dashboard link:
https://syzkaller.appspot.com/bug?extid=74c173aeaa91ec56b6b1
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/267e46ee7273/disk-c16c81c8.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/944e289206cf/vmlinux-c16c81c8.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/f8cadf62458e/bzImage-c16c81c8.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+74c173...@syzkaller.appspotmail.com
input: Steam Controller as /devices/platform/dummy_hcd.5/usb6/6-1/6-1:0.0/0003:28DE:1102.0006/input/input10
======================================================
WARNING: possible circular locking dependency detected
5.15.178-syzkaller #0 Not tainted
------------------------------------------------------
syz.5.728/7068 is trying to acquire lock:
ffffffff8d74f108 (input_mutex){+.+.}-{3:3}, at: input_register_device+0xb81/0x1150 drivers/input/input.c:2422
but task is already holding lock:
ffff8880552e1ee0 (&hdev->ll_open_lock){+.+.}-{3:3}, at: hid_hw_close+0x2c/0xd0 drivers/hid/hid-core.c:2142
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #2 (&hdev->ll_open_lock){+.+.}-{3:3}:
lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
__mutex_lock_common+0x1da/0x25a0 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+0x24/0x160 drivers/hid/hid-core.c:2116
input_open_device+0x188/0x2d0 drivers/input/input.c:640
kbd_connect+0xe5/0x120 drivers/tty/vt/keyboard.c:1581
input_attach_handler drivers/input/input.c:1046 [inline]
input_register_device+0xdae/0x1150 drivers/input/input.c:2429
hidinput_connect+0x2044/0x28b0 drivers/hid/hid-input.c:2030
hid_connect+0x45f/0xd50 drivers/hid/hid-core.c:1972
hid_hw_start+0x99/0x100 drivers/hid/hid-core.c:2079
hid_device_probe+0x341/0x3a0 drivers/hid/hid-core.c:2311
really_probe+0x24e/0xb60 drivers/base/dd.c:595
__driver_probe_device+0x1a2/0x3d0 drivers/base/dd.c:755
driver_probe_device+0x50/0x420 drivers/base/dd.c:785
__device_attach_driver+0x2b9/0x500 drivers/base/dd.c:907
bus_for_each_drv+0x183/0x200 drivers/base/bus.c:429
__device_attach+0x359/0x570 drivers/base/dd.c:979
bus_probe_device+0xba/0x1e0 drivers/base/bus.c:489
device_add+0xb48/0xfd0 drivers/base/core.c:3412
hid_add_device+0x3a5/0x510 drivers/hid/hid-core.c:2459
usbhid_probe+0xb32/0xec0 drivers/hid/usbhid/hid-core.c:1424
usb_probe_interface+0x5c0/0xaf0 drivers/usb/core/driver.c:396
really_probe+0x24e/0xb60 drivers/base/dd.c:595
__driver_probe_device+0x1a2/0x3d0 drivers/base/dd.c:755
driver_probe_device+0x50/0x420 drivers/base/dd.c:785
__device_attach_driver+0x2b9/0x500 drivers/base/dd.c:907
bus_for_each_drv+0x183/0x200 drivers/base/bus.c:429
__device_attach+0x359/0x570 drivers/base/dd.c:979
bus_probe_device+0xba/0x1e0 drivers/base/bus.c:489
device_add+0xb48/0xfd0 drivers/base/core.c:3412
usb_set_configuration+0x19dd/0x2020 drivers/usb/core/message.c:2165
usb_generic_driver_probe+0x84/0x140 drivers/usb/core/generic.c:238
usb_probe_device+0x130/0x260 drivers/usb/core/driver.c:293
really_probe+0x24e/0xb60 drivers/base/dd.c:595
__driver_probe_device+0x1a2/0x3d0 drivers/base/dd.c:755
driver_probe_device+0x50/0x420 drivers/base/dd.c:785
__device_attach_driver+0x2b9/0x500 drivers/base/dd.c:907
bus_for_each_drv+0x183/0x200 drivers/base/bus.c:429
__device_attach+0x359/0x570 drivers/base/dd.c:979
bus_probe_device+0xba/0x1e0 drivers/base/bus.c:489
device_add+0xb48/0xfd0 drivers/base/core.c:3412
usb_new_device+0xc21/0x18f0 drivers/usb/core/hub.c:2593
hub_port_connect drivers/usb/core/hub.c:5457 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5597 [inline]
port_event drivers/usb/core/hub.c:5743 [inline]
hub_event+0x2cdf/0x54c0 drivers/usb/core/hub.c:5825
process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2310
worker_thread+0xaca/0x1280 kernel/workqueue.c:2457
kthread+0x3f6/0x4f0 kernel/kthread.c:334
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
-> #1 (&dev->mutex#2){+.+.}-{3:3}:
lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
__mutex_lock_common+0x1da/0x25a0 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+0x69/0x3a0 drivers/input/input.c:2588
kbd_connect+0xbb/0x120 drivers/tty/vt/keyboard.c:1577
input_attach_handler drivers/input/input.c:1046 [inline]
input_register_device+0xdae/0x1150 drivers/input/input.c:2429
acpi_button_add+0x62d/0x9f0 drivers/acpi/button.c:579
acpi_device_probe+0xa3/0x2f0 drivers/acpi/bus.c:1013
really_probe+0x24e/0xb60 drivers/base/dd.c:595
__driver_probe_device+0x1a2/0x3d0 drivers/base/dd.c:755
driver_probe_device+0x50/0x420 drivers/base/dd.c:785
__driver_attach+0x479/0x690 drivers/base/dd.c:1164
bus_for_each_dev+0x17c/0x1f0 drivers/base/bus.c:303
bus_add_driver+0x334/0x600 drivers/base/bus.c:620
driver_register+0x2bf/0x3a0 drivers/base/driver.c:240
do_one_initcall+0x22b/0x7a0 init/main.c:1302
do_initcall_level+0x157/0x210 init/main.c:1375
do_initcalls+0x49/0x90 init/main.c:1391
kernel_init_freeable+0x425/0x5c0 init/main.c:1615
kernel_init+0x19/0x290 init/main.c:1506
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
-> #0 (
input_mutex){+.+.}-{3:3}:
check_prev_add kernel/locking/lockdep.c:3053 [inline]
check_prevs_add kernel/locking/lockdep.c:3172 [inline]
validate_chain+0x1649/0x5930 kernel/locking/lockdep.c:3788
__lock_acquire+0x1295/0x1ff0 kernel/locking/lockdep.c:5012
lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
__mutex_lock_common+0x1da/0x25a0 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+0xb81/0x1150 drivers/input/input.c:2422
steam_input_register+0x947/0xbd0 drivers/hid/hid-steam.c:469
hid_hw_close+0xa4/0xd0 drivers/hid/hid-core.c:2144
drop_ref drivers/hid/hidraw.c:338 [inline]
hidraw_release+0x3bd/0x600 drivers/hid/hidraw.c:360
__fput+0x3fe/0x8e0 fs/file_table.c:280
task_work_run+0x129/0x1a0 kernel/task_work.c:188
tracehook_notify_resume include/linux/tracehook.h:189 [inline]
exit_to_user_mode_loop+0x106/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+0x5d/0x240 kernel/entry/common.c:307
do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:86
entry_SYSCALL_64_after_hwframe+0x66/0xd0
other info that might help us debug this:
Chain exists of:
input_mutex --> &dev->mutex#2 --> &hdev->ll_open_lock
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(&hdev->ll_open_lock);
lock(
&dev->mutex#2);
lock(&hdev->ll_open_lock);
lock(
input_mutex
);
*** DEADLOCK ***
2 locks held by syz.5.728/7068:
#0:
ffffffff8dac2ea8 (minors_lock){+.+.}-{3:3}, at: hidraw_release+0x74/0x600 drivers/hid/hidraw.c:351
#1: ffff8880552e1ee0 (&hdev->ll_open_lock){+.+.}-{3:3}, at: hid_hw_close+0x2c/0xd0 drivers/hid/hid-core.c:2142
stack backtrace:
CPU: 0 PID: 7068 Comm: syz.5.728 Not tainted 5.15.178-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106
check_noncircular+0x2f8/0x3b0 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+0x1649/0x5930 kernel/locking/lockdep.c:3788
__lock_acquire+0x1295/0x1ff0 kernel/locking/lockdep.c:5012
lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
__mutex_lock_common+0x1da/0x25a0 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+0xb81/0x1150 drivers/input/input.c:2422
steam_input_register+0x947/0xbd0 drivers/hid/hid-steam.c:469
hid_hw_close+0xa4/0xd0 drivers/hid/hid-core.c:2144
drop_ref drivers/hid/hidraw.c:338 [inline]
hidraw_release+0x3bd/0x600 drivers/hid/hidraw.c:360
__fput+0x3fe/0x8e0 fs/file_table.c:280
task_work_run+0x129/0x1a0 kernel/task_work.c:188
tracehook_notify_resume include/linux/tracehook.h:189 [inline]
exit_to_user_mode_loop+0x106/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+0x5d/0x240 kernel/entry/common.c:307
do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:86
entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7ff616215169
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe4df1a2e8 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4
RAX: 0000000000000000 RBX: 0000000000058851 RCX: 00007ff616215169
RDX: 0000000000000000 RSI: 000000000000001e RDI: 0000000000000003
RBP: 00007ff61642fba0 R08: 0000000000000001 R09: 000000074df1a5df
R10: 00007ff616088000 R11: 0000000000000246 R12: 00007ff61642dfac
R13: 00007ff61642dfa0 R14: ffffffffffffffff R15: 00007ffe4df1a400
</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