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=17d9c078580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=d302c69e93fb6774
dashboard link:
https://syzkaller.appspot.com/bug?extid=4bb3bcf1da5385e36785
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:
[email protected]
======================================================
WARNING: possible circular locking dependency detected
5.15.178-syzkaller #0 Not tainted
------------------------------------------------------
syz.0.374/5502 is trying to acquire lock:
ffff88814ca742c0 (&dev->mutex#2){+.+.}-{3:3}, at: input_disconnect_device drivers/input/input.c:748 [inline]
ffff88814ca742c0 (&dev->mutex#2){+.+.}-{3:3}, at: __input_unregister_device+0x2e/0x320 drivers/input/input.c:2278
but task is already holding lock:
ffff88807cef1ee0 (&hdev->ll_open_lock){+.+.}-{3:3}, at: hid_hw_open+0x24/0x160 drivers/hid/hid-core.c:2116
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #1 (&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
-> #0 (&dev->mutex#2){+.+.}-{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_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+0x9f/0xf0 drivers/input/input.c:2473
steam_client_ll_open+0x73/0x90 drivers/hid/hid-steam.c:640
hid_hw_open+0xdb/0x160 drivers/hid/hid-core.c:2121
hidraw_open+0x293/0x8d0 drivers/hid/hidraw.c:289
chrdev_open+0x54a/0x630 fs/char_dev.c:414
do_dentry_open+0x807/0xfb0 fs/open.c:826
do_open fs/namei.c:3608 [inline]
path_openat+0x2705/0x2f20 fs/namei.c:3742
do_filp_open+0x21c/0x460 fs/namei.c:3769
do_sys_openat2+0x13b/0x4f0 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+0x243/0x290 fs/open.c:1280
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3b/0xb0 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(&hdev->ll_open_lock);
lock(&dev->mutex#2);
lock(&hdev->ll_open_lock);
lock(&dev->mutex#2);
*** DEADLOCK ***
2 locks held by syz.0.374/5502:
#0: ffffffff8dac2ea8 (minors_lock){+.+.}-{3:3}, at: hidraw_open+0x91/0x8d0 drivers/hid/hidraw.c:275
#1: ffff88807cef1ee0 (&hdev->ll_open_lock){+.+.}-{3:3}, at: hid_hw_open+0x24/0x160 drivers/hid/hid-core.c:2116
stack backtrace:
CPU: 0 PID: 5502 Comm: syz.0.374 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_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+0x9f/0xf0 drivers/input/input.c:2473
steam_client_ll_open+0x73/0x90 drivers/hid/hid-steam.c:640
hid_hw_open+0xdb/0x160 drivers/hid/hid-core.c:2121
hidraw_open+0x293/0x8d0 drivers/hid/hidraw.c:289
chrdev_open+0x54a/0x630 fs/char_dev.c:414
do_dentry_open+0x807/0xfb0 fs/open.c:826
do_open fs/namei.c:3608 [inline]
path_openat+0x2705/0x2f20 fs/namei.c:3742
do_filp_open+0x21c/0x460 fs/namei.c:3769
do_sys_openat2+0x13b/0x4f0 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+0x243/0x290 fs/open.c:1280
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f28ae0d4ad0
Code: 48 89 44 24 20 75 93 44 89 54 24 0c e8 49 94 02 00 44 8b 54 24 0c 89 da 48 89 ee 41 89 c0 bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 77 38 44 89 c7 89 44 24 0c e8 9c 94 02 00 8b 44
RSP: 002b:00007f28abf3eb70 EFLAGS: 00000293 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f28ae0d4ad0
RDX: 0000000000000000 RSI: 00007f28abf3ec10 RDI: 00000000ffffff9c
RBP: 00007f28abf3ec10 R08: 0000000000000000 R09: 0023776172646968
R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f28ae2eefa0 R15: 00007ffcdbe6e2c8
</TASK>
input: Steam Controller as /devices/platform/dummy_hcd.0/usb1/1-1/1-1:0.0/0003:28DE:1102.0006/input/input14
---
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
[email protected].
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