============================================ WARNING: possible recursive locking detected 6.1.87-syzkaller #0 Not tainted -------------------------------------------- syz-executor.2/5522 is trying to acquire lock: ffff0000eec54378 (&ctx->cq_wait){....}-{2:2}, at: __wake_up_common_lock kernel/sched/wait.c:137 [inline] ffff0000eec54378 (&ctx->cq_wait){....}-{2:2}, at: __wake_up+0xec/0x1a8 kernel/sched/wait.c:160 but task is already holding lock: ffff0000eec54378 (&ctx->cq_wait){....}-{2:2}, at: __wake_up_common_lock kernel/sched/wait.c:137 [inline] ffff0000eec54378 (&ctx->cq_wait){....}-{2:2}, at: __wake_up+0xec/0x1a8 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.2/5522: #0: ffff0000eec540a8 (&ctx->uring_lock){+.+.}-{3:3}, at: __do_sys_io_uring_enter io_uring/io_uring.c:3287 [inline] #0: ffff0000eec540a8 (&ctx->uring_lock){+.+.}-{3:3}, at: __se_sys_io_uring_enter io_uring/io_uring.c:3220 [inline] #0: ffff0000eec540a8 (&ctx->uring_lock){+.+.}-{3:3}, at: __arm64_sys_io_uring_enter+0x31c/0x2238 io_uring/io_uring.c:3220 #1: ffff0000eec54378 (&ctx->cq_wait){....}-{2:2}, at: __wake_up_common_lock kernel/sched/wait.c:137 [inline] #1: ffff0000eec54378 (&ctx->cq_wait){....}-{2:2}, at: __wake_up+0xec/0x1a8 kernel/sched/wait.c:160 stack backtrace: CPU: 0 PID: 5522 Comm: syz-executor.2 Not tainted 6.1.87-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call trace: dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106 dump_stack+0x1c/0x5c lib/dump_stack.c:113 __lock_acquire+0x6310/0x7680 kernel/locking/lockdep.c:5049 lock_acquire+0x26c/0x7cc kernel/locking/lockdep.c:5662 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x6c/0xb4 kernel/locking/spinlock.c:162 __wake_up_common_lock kernel/sched/wait.c:137 [inline] __wake_up+0xec/0x1a8 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+0x304/0x528 io_uring/io_uring.c:1128 io_req_task_work_add io_uring/io_uring.h:86 [inline] __io_poll_execute+0x184/0x42c io_uring/poll.c:390 io_poll_wake+0x2d8/0x3e0 io_uring/poll.c:465 __wake_up_common+0x23c/0x3bc kernel/sched/wait.c:107 __wake_up_common_lock kernel/sched/wait.c:138 [inline] __wake_up+0x10c/0x1a8 kernel/sched/wait.c:160 __io_cqring_wake io_uring/io_uring.h:224 [inline] io_cqring_wake io_uring/io_uring.h:231 [inline] io_cqring_ev_posted io_uring/io_uring.c:574 [inline] __io_cq_unlock_post io_uring/io_uring.c:582 [inline] io_cq_unlock_post io_uring/io_uring.c:587 [inline] io_req_complete_post+0x5ec/0x928 io_uring/io_uring.c:846 io_req_complete_failed+0x1a4/0x280 io_uring/io_uring.c:865 io_queue_sqe_fallback+0x110/0x190 io_uring/io_uring.c:1923 io_submit_fail_init+0x33c/0x7d0 io_uring/io_uring.c:2107 io_submit_sqes+0x9e0/0x1aa8 io_uring/io_uring.c:2282 __do_sys_io_uring_enter io_uring/io_uring.c:3288 [inline] __se_sys_io_uring_enter io_uring/io_uring.c:3220 [inline] __arm64_sys_io_uring_enter+0x32c/0x2238 io_uring/io_uring.c:3220 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585