============================================ WARNING: possible recursive locking detected 6.1.90-syzkaller #0 Not tainted -------------------------------------------- syz-executor.0/3562 is trying to acquire lock: ffffc900055990d8 (&rb->spinlock){..-.}-{2:2}, at: __bpf_ringbuf_reserve+0x20d/0x4f0 kernel/bpf/ringbuf.c:410 but task is already holding lock: ffffc900055d90d8 (&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.0/3562: #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_run1+0xec/0x3d0 kernel/trace/bpf_trace.c:2311 #1: ffffc900055d90d8 (&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: 1 PID: 3562 Comm: syz-executor.0 Not tainted 6.1.90-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 __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_918f90024333f9ff+0x3a/0x3e 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_reserve kernel/bpf/ringbuf.c:445 [inline] bpf_ringbuf_reserve+0x58/0x70 kernel/bpf/ringbuf.c:437 bpf_prog_f42551b0fba4abb2+0x25/0x3f 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_run1+0x1d9/0x3d0 kernel/trace/bpf_trace.c:2311 trace_sched_process_wait include/trace/events/sched.h:347 [inline] do_wait+0xae8/0xb80 kernel/exit.c:1584 kernel_wait4+0x29e/0x3e0 kernel/exit.c:1775 __do_sys_wait4 kernel/exit.c:1803 [inline] __se_sys_wait4 kernel/exit.c:1799 [inline] __x64_sys_wait4+0x130/0x1e0 kernel/exit.c:1799 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:0x7f7a9867a757 Code: 89 7c 24 10 48 89 4c 24 18 e8 d5 a3 02 00 4c 8b 54 24 18 8b 54 24 14 41 89 c0 48 8b 74 24 08 8b 7c 24 10 b8 3d 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 89 44 24 10 e8 25 a4 02 00 8b 44 RSP: 002b:00007fffa98f5dd0 EFLAGS: 00000293 ORIG_RAX: 000000000000003d RAX: ffffffffffffffda RBX: 0000000000000011 RCX: 00007f7a9867a757 RDX: 0000000040000001 RSI: 00007fffa98f5e5c RDI: 00000000ffffffff RBP: 00007fffa98f5e5c R08: 0000000000000000 R09: 0000000000000010 R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000032 R13: 0000000000011863 R14: 00000000000117f2 R15: 000000000000000a