Hello,
syzbot found the following issue on:
HEAD commit: 909ba1f1b414 Linux 6.1.90
git tree: linux-6.1.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=14fa9450980000
kernel config:
https://syzkaller.appspot.com/x/.config?x=3be6d6f79b879a67
dashboard link:
https://syzkaller.appspot.com/bug?extid=2f445fb32f2350d20dee
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/63178de7cba7/disk-909ba1f1.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/25dec90d8126/vmlinux-909ba1f1.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/25509ea1c6cd/bzImage-909ba1f1.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
[email protected]
input: syz1 as /devices/virtual/input/input6
======================================================
WARNING: possible circular locking dependency detected
6.1.90-syzkaller #0 Not tainted
------------------------------------------------------
syz-executor.1/16091 is trying to acquire lock:
ffff88805921e070 (&newdev->mutex){+.+.}-{3:3}, at: uinput_request_send drivers/input/misc/uinput.c:150 [inline]
ffff88805921e070 (&newdev->mutex){+.+.}-{3:3}, at: uinput_request_submit+0x198/0x730 drivers/input/misc/uinput.c:181
but task is already holding lock:
ffff88805921b8b0 (&ff->mutex){+.+.}-{3:3}, at: input_ff_upload+0x3e0/0xae0 drivers/input/ff-core.c:120
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #3 (&ff->mutex){+.+.}-{3:3}:
lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
__mutex_lock_common kernel/locking/mutex.c:603 [inline]
__mutex_lock+0x132/0xd80 kernel/locking/mutex.c:747
input_ff_flush+0x5a/0x130 drivers/input/ff-core.c:240
input_flush_device+0x94/0xc0 drivers/input/input.c:682
evdev_release+0xf5/0x7c0 drivers/input/evdev.c:444
__fput+0x3b7/0x890 fs/file_table.c:320
task_work_run+0x246/0x300 kernel/task_work.c:179
resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
exit_to_user_mode_loop+0xde/0x100 kernel/entry/common.c:177
exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:210
__syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline]
syscall_exit_to_user_mode+0x60/0x270 kernel/entry/common.c:303
do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:87
entry_SYSCALL_64_after_hwframe+0x68/0xd2
-> #2 (&dev->mutex#2){+.+.}-{3:3}:
lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
__mutex_lock_common kernel/locking/mutex.c:603 [inline]
__mutex_lock+0x132/0xd80 kernel/locking/mutex.c:747
input_register_handle+0x69/0x3a0 drivers/input/input.c:2555
kbd_connect+0xbb/0x120 drivers/tty/vt/keyboard.c:1589
input_attach_handler drivers/input/input.c:1060 [inline]
input_register_device+0xcec/0x1080 drivers/input/input.c:2396
acpi_button_add+0x62a/0x9f0 drivers/acpi/button.c:559
acpi_device_probe+0xa0/0x2f0 drivers/acpi/bus.c:1023
really_probe+0x2ab/0xcb0 drivers/base/dd.c:639
__driver_probe_device+0x1a2/0x3d0 drivers/base/dd.c:785
driver_probe_device+0x50/0x420 drivers/base/dd.c:815
__driver_attach+0x458/0x6f0 drivers/base/dd.c:1201
bus_for_each_dev+0x17c/0x1f0 drivers/base/bus.c:301
bus_add_driver+0x334/0x600 drivers/base/bus.c:618
driver_register+0x2bf/0x3a0 drivers/base/driver.c:246
do_one_initcall+0x265/0x8f0 init/main.c:1299
do_initcall_level+0x157/0x207 init/main.c:1372
do_initcalls+0x49/0x86 init/main.c:1388
kernel_init_freeable+0x45c/0x60f init/main.c:1627
kernel_init+0x19/0x290 init/main.c:1515
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
-> #1 (input_mutex){+.+.}-{3:3}:
lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
__mutex_lock_common kernel/locking/mutex.c:603 [inline]
__mutex_lock+0x132/0xd80 kernel/locking/mutex.c:747
input_register_device+0xadd/0x1080 drivers/input/input.c:2389
uinput_create_device+0x40e/0x620 drivers/input/misc/uinput.c:364
uinput_ioctl_handler+0xa83/0x16d0 drivers/input/misc/uinput.c:870
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:870 [inline]
__se_sys_ioctl+0xf1/0x160 fs/ioctl.c:856
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x68/0xd2
-> #0 (&newdev->mutex){+.+.}-{3:3}:
check_prev_add kernel/locking/lockdep.c:3090 [inline]
check_prevs_add kernel/locking/lockdep.c:3209 [inline]
validate_chain+0x1661/0x5950 kernel/locking/lockdep.c:3825
__lock_acquire+0x125b/0x1f80 kernel/locking/lockdep.c:5049
lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
__mutex_lock_common kernel/locking/mutex.c:603 [inline]
__mutex_lock+0x132/0xd80 kernel/locking/mutex.c:747
uinput_request_send drivers/input/misc/uinput.c:150 [inline]
uinput_request_submit+0x198/0x730 drivers/input/misc/uinput.c:181
uinput_dev_upload_effect+0x195/0x230 drivers/input/misc/uinput.c:256
input_ff_upload+0x5d7/0xae0 drivers/input/ff-core.c:150
evdev_do_ioctl drivers/input/evdev.c:1183 [inline]
evdev_ioctl_handler+0x16ee/0x2170 drivers/input/evdev.c:1272
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:870 [inline]
__se_sys_ioctl+0xf1/0x160 fs/ioctl.c:856
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x68/0xd2
other info that might help us debug this:
Chain exists of:
&newdev->mutex --> &dev->mutex#2 --> &ff->mutex
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(&ff->mutex);
lock(&dev->mutex#2);
lock(&ff->mutex);
lock(&newdev->mutex);
*** DEADLOCK ***
2 locks held by syz-executor.1/16091:
#0: ffff88807a7d4110 (&evdev->mutex){+.+.}-{3:3}, at: evdev_ioctl_handler+0x124/0x2170 drivers/input/evdev.c:1263
#1: ffff88805921b8b0 (&ff->mutex){+.+.}-{3:3}, at: input_ff_upload+0x3e0/0xae0 drivers/input/ff-core.c:120
stack backtrace:
CPU: 1 PID: 16091 Comm: syz-executor.1 Not tainted 6.1.90-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
check_noncircular+0x2fa/0x3b0 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+0x1661/0x5950 kernel/locking/lockdep.c:3825
__lock_acquire+0x125b/0x1f80 kernel/locking/lockdep.c:5049
lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
__mutex_lock_common kernel/locking/mutex.c:603 [inline]
__mutex_lock+0x132/0xd80 kernel/locking/mutex.c:747
uinput_request_send drivers/input/misc/uinput.c:150 [inline]
uinput_request_submit+0x198/0x730 drivers/input/misc/uinput.c:181
uinput_dev_upload_effect+0x195/0x230 drivers/input/misc/uinput.c:256
input_ff_upload+0x5d7/0xae0 drivers/input/ff-core.c:150
evdev_do_ioctl drivers/input/evdev.c:1183 [inline]
evdev_ioctl_handler+0x16ee/0x2170 drivers/input/evdev.c:1272
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:870 [inline]
__se_sys_ioctl+0xf1/0x160 fs/ioctl.c:856
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f15b647dca9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f15b4ff60c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f15b65abf80 RCX: 00007f15b647dca9
RDX: 0000000020000300 RSI: 0000000040304580 RDI: 0000000000000004
RBP: 00007f15b64c947e R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007f15b65abf80 R15: 00007fffd073bfe8
</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
[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