============================================ WARNING: possible recursive locking detected 6.11.0-syzkaller-10548-g8b62645b09f8 #0 Not tainted -------------------------------------------- syz-executor/5238 is trying to acquire lock: ffffc9000347d0d8 (&rb->spinlock){-.-.}-{2:2}, at: __bpf_ringbuf_reserve+0x1ea/0x600 kernel/bpf/ringbuf.c:427 but task is already holding lock: ffffc900034690d8 (&rb->spinlock){-.-.}-{2:2}, at: __bpf_ringbuf_reserve+0x1ea/0x600 kernel/bpf/ringbuf.c:427 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&rb->spinlock); lock(&rb->spinlock); *** DEADLOCK *** May be due to missing lock nesting notation 4 locks held by syz-executor/5238: #0: ffff8880b863ea98 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:593 #1: ffffffff8e937ee0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline] #1: ffffffff8e937ee0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #1: ffffffff8e937ee0 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2317 [inline] #1: ffffffff8e937ee0 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run4+0x244/0x590 kernel/trace/bpf_trace.c:2361 #2: ffffc900034690d8 (&rb->spinlock){-.-.}-{2:2}, at: __bpf_ringbuf_reserve+0x1ea/0x600 kernel/bpf/ringbuf.c:427 #3: ffffffff8e937ee0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline] #3: ffffffff8e937ee0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #3: ffffffff8e937ee0 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2317 [inline] #3: ffffffff8e937ee0 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1fc/0x540 kernel/trace/bpf_trace.c:2359 stack backtrace: CPU: 0 UID: 0 PID: 5238 Comm: syz-executor Not tainted 6.11.0-syzkaller-10548-g8b62645b09f8 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_deadlock_bug+0x483/0x620 kernel/locking/lockdep.c:3034 check_deadlock kernel/locking/lockdep.c:3086 [inline] validate_chain+0x15e2/0x5920 kernel/locking/lockdep.c:3888 __lock_acquire+0x1384/0x2050 kernel/locking/lockdep.c:5199 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5822 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162 __bpf_ringbuf_reserve+0x1ea/0x600 kernel/bpf/ringbuf.c:427 ____bpf_ringbuf_reserve kernel/bpf/ringbuf.c:478 [inline] bpf_ringbuf_reserve+0x5c/0x70 kernel/bpf/ringbuf.c:470 bpf_prog_0e153dac479590bf+0x35/0x70 bpf_dispatcher_nop_func include/linux/bpf.h:1257 [inline] __bpf_prog_run include/linux/filter.h:701 [inline] bpf_prog_run include/linux/filter.h:708 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2318 [inline] bpf_trace_run2+0x2ec/0x540 kernel/trace/bpf_trace.c:2359 trace_contention_begin+0x117/0x140 include/trace/events/lock.h:95 __pv_queued_spin_lock_slowpath+0x114/0xdb0 kernel/locking/qspinlock.c:402 pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:584 [inline] queued_spin_lock_slowpath+0x42/0x50 arch/x86/include/asm/qspinlock.h:51 queued_spin_lock include/asm-generic/qspinlock.h:114 [inline] do_raw_spin_lock+0x272/0x370 kernel/locking/spinlock_debug.c:116 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline] _raw_spin_lock_irqsave+0xe1/0x120 kernel/locking/spinlock.c:162 __bpf_ringbuf_reserve+0x1ea/0x600 kernel/bpf/ringbuf.c:427 ____bpf_ringbuf_reserve kernel/bpf/ringbuf.c:478 [inline] bpf_ringbuf_reserve+0x5c/0x70 kernel/bpf/ringbuf.c:470 bpf_prog_977085001e608fa3+0x36/0x50 bpf_dispatcher_nop_func include/linux/bpf.h:1257 [inline] __bpf_prog_run include/linux/filter.h:701 [inline] bpf_prog_run include/linux/filter.h:708 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2318 [inline] bpf_trace_run4+0x334/0x590 kernel/trace/bpf_trace.c:2361 __traceiter_sched_switch+0x98/0xd0 include/trace/events/sched.h:222 trace_sched_switch include/trace/events/sched.h:222 [inline] __schedule+0x234a/0x4b30 kernel/sched/core.c:6672 preempt_schedule_notrace+0x100/0x140 kernel/sched/core.c:6947 preempt_schedule_notrace_thunk+0x1a/0x30 arch/x86/entry/thunk.S:13 trace_sys_enter+0xa5/0xd0 include/trace/events/syscalls.h:18 syscall_trace_enter+0xf8/0x150 kernel/entry/common.c:61 syscall_enter_from_user_mode_work include/linux/entry-common.h:168 [inline] syscall_enter_from_user_mode include/linux/entry-common.h:198 [inline] do_syscall_64+0xcc/0x230 arch/x86/entry/common.c:79 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fed9b319879 Code: 64 c7 00 16 00 00 00 b8 ff ff ff ff c3 0f 1f 40 00 90 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 c7 c0 0f 00 00 00 0f 05 <0f> 1f 80 00 00 00 00 48 81 ec 48 01 00 00 49 89 d0 64 48 8b 04 25 RSP: 002b:00007ffddd8f3700 EFLAGS: 00000206 ORIG_RAX: 000000000000000f RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fed9b319879 RDX: 00007ffddd8f3700 RSI: 00007ffddd8f3830 RDI: 0000000000000011 RBP: 00007ffddd8f3d60 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000100 R11: 0000000000000206 R12: 00007ffddd8f4de0 R13: 00007fed9b3f0a14 R14: 000000000001c0dd R15: 00007ffddd8f4e20