============================================ WARNING: possible recursive locking detected 6.1.84-syzkaller #0 Not tainted -------------------------------------------- syz-executor.1/13867 is trying to acquire lock: ffff88807c515378 (&ctx->cq_wait){....}-{2:2}, at: __wake_up_common_lock kernel/sched/wait.c:137 [inline] ffff88807c515378 (&ctx->cq_wait){....}-{2:2}, at: __wake_up+0xfd/0x1c0 kernel/sched/wait.c:160 but task is already holding lock: ffff88807c515378 (&ctx->cq_wait){....}-{2:2}, at: __wake_up_common_lock kernel/sched/wait.c:137 [inline] ffff88807c515378 (&ctx->cq_wait){....}-{2:2}, at: __wake_up+0xfd/0x1c0 kernel/sched/wait.c:160 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&ctx->cq_wait); lock(&ctx->cq_wait); *** DEADLOCK *** May be due to missing lock nesting notation 2 locks held by syz-executor.1/13867: #0: ffff88807c5150a8 (&ctx->uring_lock){+.+.}-{3:3}, at: __do_sys_io_uring_enter io_uring/io_uring.c:3280 [inline] #0: ffff88807c5150a8 (&ctx->uring_lock){+.+.}-{3:3}, at: __se_sys_io_uring_enter+0x336/0x2750 io_uring/io_uring.c:3213 #1: ffff88807c515378 (&ctx->cq_wait){....}-{2:2}, at: __wake_up_common_lock kernel/sched/wait.c:137 [inline] #1: ffff88807c515378 (&ctx->cq_wait){....}-{2:2}, at: __wake_up+0xfd/0x1c0 kernel/sched/wait.c:160 stack backtrace: CPU: 0 PID: 13867 Comm: syz-executor.1 Not tainted 6.1.84-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 print_deadlock_bug kernel/locking/lockdep.c:2983 [inline] check_deadlock kernel/locking/lockdep.c:3026 [inline] validate_chain+0x4711/0x5950 kernel/locking/lockdep.c:3812 __lock_acquire+0x125b/0x1f80 kernel/locking/lockdep.c:5049 lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd1/0x120 kernel/locking/spinlock.c:162 __wake_up_common_lock kernel/sched/wait.c:137 [inline] __wake_up+0xfd/0x1c0 kernel/sched/wait.c:160 __io_cqring_wake io_uring/io_uring.h:224 [inline] io_req_local_work_add io_uring/io_uring.c:1117 [inline] __io_req_task_work_add+0x3c7/0x5c0 io_uring/io_uring.c:1128 io_poll_wake+0x351/0x430 io_uring/poll.c:465 __wake_up_common+0x2a0/0x4e0 kernel/sched/wait.c:107 __wake_up_common_lock kernel/sched/wait.c:138 [inline] __wake_up+0x11a/0x1c0 kernel/sched/wait.c:160 io_submit_fail_init+0x3b2/0x698 io_uring/io_uring.c:2100 io_submit_sqes+0xc6a/0x1e70 io_uring/io_uring.c:2275 __do_sys_io_uring_enter io_uring/io_uring.c:3281 [inline] __se_sys_io_uring_enter+0x341/0x2750 io_uring/io_uring.c:3213 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f327047dde9 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:00007f326effe0c8 EFLAGS: 00000246 ORIG_RAX: 00000000000001aa RAX: ffffffffffffffda RBX: 00007f32705ac050 RCX: 00007f327047dde9 RDX: 0000000000000000 RSI: 00000000000053f8 RDI: 0000000000000006 RBP: 00007f32704ca47a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f32705ac050 R15: 00007ffcb24a7498