====================================================== WARNING: possible circular locking dependency detected 6.12.0-rc5-next-20241101-syzkaller-08858-gc88416ba074a #0 Not tainted ------------------------------------------------------ syz-executor.2/6347 is trying to acquire lock: ffff88807d537070 (&newdev->mutex ){+.+.}-{4:4} , at: uinput_request_send drivers/input/misc/uinput.c:151 [inline] , at: uinput_request_submit+0x19c/0x740 drivers/input/misc/uinput.c:182 but task is already holding lock: ffff88807d5378b0 (&ff->mutex ){+.+.}-{4:4} , at: input_ff_upload+0x3e4/0xb00 drivers/input/ff-core.c:122 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (&ff->mutex ){+.+.}-{4:4} : lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5849 __mutex_lock_common kernel/locking/mutex.c:585 [inline] __mutex_lock+0x1ac/0xee0 kernel/locking/mutex.c:735 input_ff_flush+0x5e/0x140 drivers/input/ff-core.c:242 input_flush_device+0x9c/0xc0 drivers/input/input.c:649 evdev_release+0xf6/0x7d0 drivers/input/evdev.c:435 __fput+0x23c/0xa50 fs/file_table.c:450 __do_sys_close fs/open.c:1571 [inline] __se_sys_close fs/open.c:1556 [inline] __x64_sys_close+0x7f/0x110 fs/open.c:1556 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #2 ( &dev->mutex#2 ){+.+.}-{4:4} : lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5849 __mutex_lock_common kernel/locking/mutex.c:585 [inline] __mutex_lock+0x1ac/0xee0 kernel/locking/mutex.c:735 input_register_handle+0x6d/0x3b0 drivers/input/input.c:2708 kbd_connect+0xbf/0x130 drivers/tty/vt/keyboard.c:1587 input_attach_handler drivers/input/input.c:1027 [inline] input_register_device+0xd3b/0x1110 drivers/input/input.c:2470 acpi_button_add+0x6c6/0xb90 drivers/acpi/button.c:615 acpi_device_probe+0xa5/0x2b0 drivers/acpi/bus.c:1076 really_probe+0x2b8/0xad0 drivers/base/dd.c:658 __driver_probe_device+0x1a2/0x390 drivers/base/dd.c:800 driver_probe_device+0x50/0x430 drivers/base/dd.c:830 __driver_attach+0x45f/0x710 drivers/base/dd.c:1216 bus_for_each_dev+0x239/0x2b0 drivers/base/bus.c:370 bus_add_driver+0x346/0x670 drivers/base/bus.c:675 driver_register+0x23a/0x320 drivers/base/driver.c:246 do_one_initcall+0x248/0x880 init/main.c:1266 do_initcall_level+0x157/0x210 init/main.c:1328 do_initcalls+0x3f/0x80 init/main.c:1344 kernel_init_freeable+0x435/0x5d0 init/main.c:1577 kernel_init+0x1d/0x2b0 init/main.c:1466 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 -> #1 ( input_mutex ){+.+.}-{4:4} : lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5849 __mutex_lock_common kernel/locking/mutex.c:585 [inline] __mutex_lock+0x1ac/0xee0 kernel/locking/mutex.c:735 input_register_device+0xaee/0x1110 drivers/input/input.c:2463 uinput_create_device+0x40e/0x630 drivers/input/misc/uinput.c:365 uinput_ioctl_handler+0x488/0x1770 drivers/input/misc/uinput.c:918 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:907 [inline] __se_sys_ioctl+0xf9/0x170 fs/ioctl.c:893 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #0 ( &newdev->mutex ){+.+.}-{4:4} : check_prev_add kernel/locking/lockdep.c:3161 [inline] check_prevs_add kernel/locking/lockdep.c:3280 [inline] validate_chain+0x18ef/0x5920 kernel/locking/lockdep.c:3904 __lock_acquire+0x1397/0x2100 kernel/locking/lockdep.c:5226 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5849 __mutex_lock_common kernel/locking/mutex.c:585 [inline] __mutex_lock+0x1ac/0xee0 kernel/locking/mutex.c:735 uinput_request_send drivers/input/misc/uinput.c:151 [inline] uinput_request_submit+0x19c/0x740 drivers/input/misc/uinput.c:182 uinput_dev_upload_effect+0x199/0x240 drivers/input/misc/uinput.c:257 input_ff_upload+0x5df/0xb00 drivers/input/ff-core.c:152 evdev_do_ioctl drivers/input/evdev.c:1181 [inline] evdev_ioctl_handler+0x17c7/0x21b0 drivers/input/evdev.c:1270 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:907 [inline] __se_sys_ioctl+0xf9/0x170 fs/ioctl.c:893 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f other info that might help us debug this: Chain exists of: &newdev->mutex