============================================ WARNING: possible recursive locking detected 6.14.0-syzkaller-ga27a97f71394 #0 Not tainted -------------------------------------------- syz.3.906/9501 is trying to acquire lock: ffffc9000c3f10d8 (&rb->spinlock){-.-.}-{2:2}, at: __bpf_ringbuf_reserve+0x20e/0x650 kernel/bpf/ringbuf.c:423 but task is already holding lock: ffffc9000c45d0d8 (&rb->spinlock){-.-.}-{2:2}, at: __bpf_ringbuf_reserve+0x20e/0x650 kernel/bpf/ringbuf.c:423 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.3.906/9501: #0: ffffffff8ed3dfe0 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:331 [inline] #0: ffffffff8ed3dfe0 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:841 [inline] #0: ffffffff8ed3dfe0 (rcu_read_lock){....}-{1:3}, at: sk_psock_verdict_recv+0x4d/0x590 net/core/skmsg.c:1204 #1: ffffc9000c45d0d8 (&rb->spinlock){-.-.}-{2:2}, at: __bpf_ringbuf_reserve+0x20e/0x650 kernel/bpf/ringbuf.c:423 #2: ffffffff8ed3dfe0 (rcu_read_lock){....}-{1:3}, at: trace_call_bpf+0xb9/0x8a0 kernel/trace/bpf_trace.c:-1 stack backtrace: CPU: 1 UID: 0 PID: 9501 Comm: syz.3.906 Not tainted 6.14.0-syzkaller-ga27a97f71394 #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_deadlock_bug+0x2be/0x2d0 kernel/locking/lockdep.c:3042 check_deadlock kernel/locking/lockdep.c:3094 [inline] validate_chain+0x928/0x24e0 kernel/locking/lockdep.c:3896 __lock_acquire+0xad5/0xd80 kernel/locking/lockdep.c:5235 lock_acquire+0x116/0x2f0 kernel/locking/lockdep.c:5866 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd8/0x130 kernel/locking/spinlock.c:162 __bpf_ringbuf_reserve+0x20e/0x650 kernel/bpf/ringbuf.c:423 ____bpf_ringbuf_reserve kernel/bpf/ringbuf.c:474 [inline] bpf_ringbuf_reserve+0x5c/0x70 kernel/bpf/ringbuf.c:466 bpf_prog_020e6543638c60de+0x36/0x53 bpf_dispatcher_nop_func include/linux/bpf.h:1316 [inline] __bpf_prog_run include/linux/filter.h:718 [inline] bpf_prog_run include/linux/filter.h:725 [inline] bpf_prog_run_array include/linux/bpf.h:2215 [inline] trace_call_bpf+0x36a/0x8a0 kernel/trace/bpf_trace.c:146 perf_trace_run_bpf_submit+0x82/0x180 kernel/events/core.c:10807 do_perf_trace_lock include/trace/events/lock.h:50 [inline] perf_trace_lock+0x39c/0x4a0 include/trace/events/lock.h:50 __do_trace_lock_release include/trace/events/lock.h:69 [inline] trace_lock_release include/trace/events/lock.h:69 [inline] lock_release+0x3b4/0x3e0 kernel/locking/lockdep.c:5877 __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:149 [inline] _raw_spin_unlock_irqrestore+0x7a/0x140 kernel/locking/spinlock.c:194 __bpf_ringbuf_reserve+0x4c5/0x650 kernel/bpf/ringbuf.c:461 ____bpf_ringbuf_output kernel/bpf/ringbuf.c:549 [inline] bpf_ringbuf_output+0x67/0x1e0 kernel/bpf/ringbuf.c:539 bpf_prog_9da7f64b4cd6af2d+0x43/0x4c bpf_dispatcher_nop_func include/linux/bpf.h:1316 [inline] __bpf_prog_run include/linux/filter.h:718 [inline] bpf_prog_run include/linux/filter.h:725 [inline] bpf_prog_run_pin_on_cpu include/linux/filter.h:742 [inline] sk_psock_verdict_recv+0x2cd/0x590 net/core/skmsg.c:1218 unix_stream_read_skb+0x140/0x370 net/unix/af_unix.c:2735 sk_psock_verdict_data_ready+0xab/0x390 net/core/skmsg.c:1242 unix_stream_sendmsg+0x7a3/0x1000 net/unix/af_unix.c:2329 sock_sendmsg_nosec net/socket.c:712 [inline] __sock_sendmsg+0x221/0x270 net/socket.c:727 ____sys_sendmsg+0x523/0x860 net/socket.c:2566 ___sys_sendmsg net/socket.c:2620 [inline] __sys_sendmsg+0x271/0x360 net/socket.c:2652 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7faacc58d169 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007faacd429038 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007faacc7a6080 RCX: 00007faacc58d169 RDX: 0000000000000000 RSI: 00002000000029c0 RDI: 0000000000000010 RBP: 00007faacc60e990 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007faacc7a6080 R15: 00007ffe9bcb21c8