============================================ WARNING: possible recursive locking detected 6.1.89-syzkaller #0 Not tainted -------------------------------------------- syz-executor.0/3978 is trying to acquire lock: ffff888076d9a378 (&ctx->cq_wait){....}-{2:2}, at: __wake_up_common_lock kernel/sched/wait.c:137 [inline] ffff888076d9a378 (&ctx->cq_wait){....}-{2:2}, at: __wake_up+0xfd/0x1c0 kernel/sched/wait.c:160 but task is already holding lock: ffff888076d9a378 (&ctx->cq_wait){....}-{2:2}, at: __wake_up_common_lock kernel/sched/wait.c:137 [inline] ffff888076d9a378 (&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.0/3978: #0: ffff888076d9a0a8 (&ctx->uring_lock){+.+.}-{3:3}, at: __do_sys_io_uring_enter io_uring/io_uring.c:3287 [inline] #0: ffff888076d9a0a8 (&ctx->uring_lock){+.+.}-{3:3}, at: __se_sys_io_uring_enter+0x336/0x2750 io_uring/io_uring.c:3220 #1: ffff888076d9a378 (&ctx->cq_wait){....}-{2:2}, at: __wake_up_common_lock kernel/sched/wait.c:137 [inline] #1: ffff888076d9a378 (&ctx->cq_wait){....}-{2:2}, at: __wake_up+0xfd/0x1c0 kernel/sched/wait.c:160 stack backtrace: CPU: 0 PID: 3978 Comm: syz-executor.0 Not tainted 6.1.89-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_queue_sqe io_uring/io_uring.c:1910 [inline] io_submit_sqe io_uring/io_uring.c:2169 [inline] io_submit_sqes+0xeed/0x1e10 io_uring/io_uring.c:2282 __do_sys_io_uring_enter io_uring/io_uring.c:3288 [inline] __se_sys_io_uring_enter+0x341/0x2750 io_uring/io_uring.c:3220 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:0x7f7812a7dda9 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:00007f78137ca0c8 EFLAGS: 00000246 ORIG_RAX: 00000000000001aa RAX: ffffffffffffffda RBX: 00007f7812babf80 RCX: 00007f7812a7dda9 RDX: 0000000000000000 RSI: 00000000000053f8 RDI: 0000000000000003 RBP: 00007f7812aca47a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f7812babf80 R15: 00007ffc8febfd58