====================================================== WARNING: possible circular locking dependency detected 6.11.0-syzkaller-05319-g4a39ac5b7d62 #0 Not tainted ------------------------------------------------------ acpid/4667 is trying to acquire lock: ffff888050d4de28 (&hdev->ll_open_lock){+.+.}-{3:3}, at: hid_hw_open+0x28/0x170 drivers/hid/hid-core.c:2361 but task is already holding lock: ffff88807a77b2c0 (&dev->mutex#2){+.+.}-{3:3}, at: input_open_device+0x52/0x2e0 drivers/input/input.c:597 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&dev->mutex#2){+.+.}-{3:3}: lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5822 __mutex_lock_common kernel/locking/mutex.c:608 [inline] __mutex_lock+0x136/0xd70 kernel/locking/mutex.c:752 input_disconnect_device drivers/input/input.c:724 [inline] __input_unregister_device+0x31/0x620 drivers/input/input.c:2270 input_unregister_device+0xa3/0x100 drivers/input/input.c:2511 steam_client_ll_open+0x88/0xa0 drivers/hid/hid-steam.c:1121 hid_hw_open+0xe3/0x170 drivers/hid/hid-core.c:2366 hidraw_open+0x298/0x8e0 drivers/hid/hidraw.c:296 chrdev_open+0x521/0x600 fs/char_dev.c:414 do_dentry_open+0x978/0x1460 fs/open.c:958 vfs_open+0x3e/0x330 fs/open.c:1088 do_open fs/namei.c:3774 [inline] path_openat+0x2c84/0x3590 fs/namei.c:3933 do_filp_open+0x235/0x490 fs/namei.c:3960 do_sys_openat2+0x13e/0x1d0 fs/open.c:1415 do_sys_open fs/open.c:1430 [inline] __do_sys_openat fs/open.c:1446 [inline] __se_sys_openat fs/open.c:1441 [inline] __x64_sys_openat+0x247/0x2a0 fs/open.c:1441 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 (&hdev->ll_open_lock){+.+.}-{3:3}: check_prev_add kernel/locking/lockdep.c:3158 [inline] check_prevs_add kernel/locking/lockdep.c:3277 [inline] validate_chain+0x18ef/0x5920 kernel/locking/lockdep.c:3901 __lock_acquire+0x1384/0x2050 kernel/locking/lockdep.c:5199 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5822 __mutex_lock_common kernel/locking/mutex.c:608 [inline] __mutex_lock+0x136/0xd70 kernel/locking/mutex.c:752 hid_hw_open+0x28/0x170 drivers/hid/hid-core.c:2361 input_open_device+0x191/0x2e0 drivers/input/input.c:617 evdev_open_device drivers/input/evdev.c:391 [inline] evdev_open+0x3e0/0x5f0 drivers/input/evdev.c:478 chrdev_open+0x521/0x600 fs/char_dev.c:414 do_dentry_open+0x978/0x1460 fs/open.c:958 vfs_open+0x3e/0x330 fs/open.c:1088 do_open fs/namei.c:3774 [inline] path_openat+0x2c84/0x3590 fs/namei.c:3933 do_filp_open+0x235/0x490 fs/namei.c:3960 do_sys_openat2+0x13e/0x1d0 fs/open.c:1415 do_sys_open fs/open.c:1430 [inline] __do_sys_openat fs/open.c:1446 [inline] __se_sys_openat fs/open.c:1441 [inline] __x64_sys_openat+0x247/0x2a0 fs/open.c:1441 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: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&dev->mutex#2); lock(&hdev->ll_open_lock); lock(&dev->mutex#2); lock(&hdev->ll_open_lock); *** DEADLOCK *** 2 locks held by acpid/4667: #0: ffff888067886110 (&evdev->mutex){+.+.}-{3:3}, at: evdev_open_device drivers/input/evdev.c:384 [inline] #0: ffff888067886110 (&evdev->mutex){+.+.}-{3:3}, at: evdev_open+0x2e9/0x5f0 drivers/input/evdev.c:478 #1: ffff88807a77b2c0 (&dev->mutex#2){+.+.}-{3:3}, at: input_open_device+0x52/0x2e0 drivers/input/input.c:597 stack backtrace: CPU: 1 UID: 0 PID: 4667 Comm: acpid Not tainted 6.11.0-syzkaller-05319-g4a39ac5b7d62 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Call Trace: __dump_stack lib/dump_stack.c:93 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:119 print_circular_bug+0x13a/0x1b0 kernel/locking/lockdep.c:2074 check_noncircular+0x36a/0x4a0 kernel/locking/lockdep.c:2203 check_prev_add kernel/locking/lockdep.c:3158 [inline] check_prevs_add kernel/locking/lockdep.c:3277 [inline] validate_chain+0x18ef/0x5920 kernel/locking/lockdep.c:3901 __lock_acquire+0x1384/0x2050 kernel/locking/lockdep.c:5199 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5822 __mutex_lock_common kernel/locking/mutex.c:608 [inline] __mutex_lock+0x136/0xd70 kernel/locking/mutex.c:752 hid_hw_open+0x28/0x170 drivers/hid/hid-core.c:2361 input_open_device+0x191/0x2e0 drivers/input/input.c:617 evdev_open_device drivers/input/evdev.c:391 [inline] evdev_open+0x3e0/0x5f0 drivers/input/evdev.c:478 chrdev_open+0x521/0x600 fs/char_dev.c:414 do_dentry_open+0x978/0x1460 fs/open.c:958 vfs_open+0x3e/0x330 fs/open.c:1088 do_open fs/namei.c:3774 [inline] path_openat+0x2c84/0x3590 fs/namei.c:3933 do_filp_open+0x235/0x490 fs/namei.c:3960 do_sys_openat2+0x13e/0x1d0 fs/open.c:1415 do_sys_open fs/open.c:1430 [inline] __do_sys_openat fs/open.c:1446 [inline] __se_sys_openat fs/open.c:1441 [inline] __x64_sys_openat+0x247/0x2a0 fs/open.c:1441 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 RIP: 0033:0x7f14530489a4 Code: 24 20 48 8d 44 24 30 48 89 44 24 28 64 8b 04 25 18 00 00 00 85 c0 75 2c 44 89 e2 48 89 ee bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 76 60 48 8b 15 55 a4 0d 00 f7 d8 64 89 02 48 83 RSP: 002b:00007ffcc9956b30 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007ffcc9956e18 RCX: 00007f14530489a4 RDX: 0000000000080800 RSI: 00007ffcc9956d18 RDI: 00000000ffffff9c RBP: 00007ffcc9956d18 R08: 00000000000000f4 R09: 00007ffcc9956d18 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000080800 R13: 0000000000000040 R14: 00007ffcc9956e18 R15: 00007ffcc9956d18