============================================ WARNING: possible recursive locking detected 6.1.92-syzkaller #0 Not tainted -------------------------------------------- syz-executor.4/4917 is trying to acquire lock: ffffc90009f990d8 (&rb->spinlock){-.-.}-{2:2}, at: __bpf_ringbuf_reserve+0x20d/0x4f0 kernel/bpf/ringbuf.c:410 but task is already holding lock: ffffc90009dd50d8 (&rb->spinlock){-.-.}-{2:2}, at: __bpf_ringbuf_reserve+0x20d/0x4f0 kernel/bpf/ringbuf.c:410 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 3 locks held by syz-executor.4/4917: #0: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline] #0: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline] #0: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2272 [inline] #0: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x110/0x410 kernel/trace/bpf_trace.c:2312 #1: ffffc90009dd50d8 (&rb->spinlock){-.-.}-{2:2}, at: __bpf_ringbuf_reserve+0x20d/0x4f0 kernel/bpf/ringbuf.c:410 #2: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline] #2: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline] #2: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2272 [inline] #2: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x110/0x410 kernel/trace/bpf_trace.c:2312 stack backtrace: CPU: 0 PID: 4917 Comm: syz-executor.4 Not tainted 6.1.92-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/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 __bpf_ringbuf_reserve+0x20d/0x4f0 kernel/bpf/ringbuf.c:410 ____bpf_ringbuf_output kernel/bpf/ringbuf.c:520 [inline] bpf_ringbuf_output+0x63/0x1e0 kernel/bpf/ringbuf.c:510 bpf_prog_a3e2825f60354855+0x3d/0x41 bpf_dispatcher_nop_func include/linux/bpf.h:989 [inline] __bpf_prog_run include/linux/filter.h:603 [inline] bpf_prog_run include/linux/filter.h:610 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2273 [inline] bpf_trace_run2+0x1fd/0x410 kernel/trace/bpf_trace.c:2312 trace_contention_end+0x14c/0x190 include/trace/events/lock.h:122 __pv_queued_spin_lock_slowpath+0x935/0xc50 kernel/locking/qspinlock.c:560 pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:591 [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+0x269/0x370 kernel/locking/spinlock_debug.c:115 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline] _raw_spin_lock_irqsave+0xdd/0x120 kernel/locking/spinlock.c:162 __bpf_ringbuf_reserve+0x20d/0x4f0 kernel/bpf/ringbuf.c:410 ____bpf_ringbuf_output kernel/bpf/ringbuf.c:520 [inline] bpf_ringbuf_output+0x63/0x1e0 kernel/bpf/ringbuf.c:510 bpf_prog_a3e2825f60354855+0x3d/0x41 bpf_dispatcher_nop_func include/linux/bpf.h:989 [inline] __bpf_prog_run include/linux/filter.h:603 [inline] bpf_prog_run include/linux/filter.h:610 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2273 [inline] bpf_trace_run2+0x1fd/0x410 kernel/trace/bpf_trace.c:2312 __traceiter_tlb_flush+0x6c/0xc0 include/trace/events/tlb.h:38 trace_tlb_flush+0x151/0x1a0 include/trace/events/tlb.h:38 flush_tlb_func+0x4e3/0x620 arch/x86/mm/tlb.c:875 __flush_smp_call_function_queue+0x2d9/0xd00 kernel/smp.c:641 __sysvec_call_function_single+0xbb/0x360 arch/x86/kernel/smp.c:267 sysvec_call_function_single+0x3b/0xb0 arch/x86/kernel/smp.c:262 asm_sysvec_call_function_single+0x16/0x20 arch/x86/include/asm/idtentry.h:661 RIP: 0033:0x7f156f038b37 Code: ae 75 17 00 00 75 40 be 00 00 00 80 48 8d 14 33 48 81 fa ff ff ff 7e 0f 87 30 02 00 00 25 ff 0f 00 00 83 f0 3d 8d 14 c0 89 d0 e8 04 31 d0 69 c0 2d eb d4 27 89 c2 c1 ea 0f 31 d0 48 31 d8 25 RSP: 002b:00007ffef02779f0 EFLAGS: 00000202 RAX: 0000000000001e45 RBX: ffffffff81ecb3af RCX: 00007f156e9ff008 RDX: 0000000000001e45 RSI: 0000000080000000 RDI: 00000000000013cf RBP: ffffffff81ecb000 R08: 0000000081ecb3cf R09: 0000000000000010 R10: 0000000081ecb3d3 R11: 0000000081ecb3cf R12: 0000000000000001 R13: 00007f156f1a0000 R14: 000000000000ee63 R15: 00007f156f1b4038