============================================ WARNING: possible recursive locking detected syzkaller #0 Not tainted -------------------------------------------- syz-executor/14945 is trying to acquire lock: ffffc9000e2550d8 (&rb->spinlock){-.-.}-{2:2}, at: __bpf_ringbuf_reserve+0x1c8/0x5a0 kernel/bpf/ringbuf.c:423 but task is already holding lock: ffffc9000e14d0d8 (&rb->spinlock){-.-.}-{2:2}, at: __bpf_ringbuf_reserve+0x1c8/0x5a0 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 4 locks held by syz-executor/14945: #0: ffffffff8e028ee8 (nf_sockopt_mutex){+.+.}-{3:3}, at: nf_sockopt_find net/netfilter/nf_sockopt.c:67 [inline] #0: ffffffff8e028ee8 (nf_sockopt_mutex){+.+.}-{3:3}, at: nf_getsockopt+0x34/0x280 net/netfilter/nf_sockopt.c:113 #1: ffffffff8cd2fe20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:334 [inline] #1: ffffffff8cd2fe20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:786 [inline] #1: ffffffff8cd2fe20 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2321 [inline] #1: ffffffff8cd2fe20 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0xde/0x3c0 kernel/trace/bpf_trace.c:2361 #2: ffffc9000e14d0d8 (&rb->spinlock){-.-.}-{2:2}, at: __bpf_ringbuf_reserve+0x1c8/0x5a0 kernel/bpf/ringbuf.c:423 #3: ffffffff8cd2fe20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:334 [inline] #3: ffffffff8cd2fe20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:786 [inline] #3: ffffffff8cd2fe20 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2321 [inline] #3: ffffffff8cd2fe20 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0xde/0x3c0 kernel/trace/bpf_trace.c:2361 stack backtrace: CPU: 0 PID: 14945 Comm: syz-executor Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025 Call Trace: dump_stack_lvl+0x16c/0x230 lib/dump_stack.c:106 check_deadlock kernel/locking/lockdep.c:3062 [inline] validate_chain kernel/locking/lockdep.c:3856 [inline] __lock_acquire+0x5d40/0x7c80 kernel/locking/lockdep.c:5137 lock_acquire+0x197/0x410 kernel/locking/lockdep.c:5754 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xa8/0xf0 kernel/locking/spinlock.c:162 __bpf_ringbuf_reserve+0x1c8/0x5a0 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_fe0ed97373b08409+0x2d/0x4a bpf_dispatcher_nop_func include/linux/bpf.h:1223 [inline] __bpf_prog_run include/linux/filter.h:612 [inline] bpf_prog_run include/linux/filter.h:619 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2322 [inline] bpf_trace_run2+0x1d1/0x3c0 kernel/trace/bpf_trace.c:2361 __bpf_trace_contention_end+0xdd/0x130 include/trace/events/lock.h:122 __traceiter_contention_end+0x78/0xb0 include/trace/events/lock.h:122 trace_contention_end+0xe6/0x110 include/trace/events/lock.h:122 __pv_queued_spin_lock_slowpath+0x7ec/0x9d0 kernel/locking/qspinlock.c:560 pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:586 [inline] queued_spin_lock_slowpath arch/x86/include/asm/qspinlock.h:51 [inline] queued_spin_lock include/asm-generic/qspinlock.h:114 [inline] do_raw_spin_lock+0x24e/0x2c0 kernel/locking/spinlock_debug.c:115 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline] _raw_spin_lock_irqsave+0xb4/0xf0 kernel/locking/spinlock.c:162 __bpf_ringbuf_reserve+0x1c8/0x5a0 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_fe0ed97373b08409+0x2d/0x4a bpf_dispatcher_nop_func include/linux/bpf.h:1223 [inline] __bpf_prog_run include/linux/filter.h:612 [inline] bpf_prog_run include/linux/filter.h:619 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2322 [inline] bpf_trace_run2+0x1d1/0x3c0 kernel/trace/bpf_trace.c:2361 __bpf_trace_contention_end+0xdd/0x130 include/trace/events/lock.h:122 __traceiter_contention_end+0x78/0xb0 include/trace/events/lock.h:122 trace_contention_end+0xc5/0xe0 include/trace/events/lock.h:122 __mutex_lock_common kernel/locking/mutex.c:612 [inline] __mutex_lock+0x2fa/0xcc0 kernel/locking/mutex.c:747 nf_sockopt_find net/netfilter/nf_sockopt.c:67 [inline] nf_getsockopt+0x34/0x280 net/netfilter/nf_sockopt.c:113 ip_getsockopt+0x1c1/0x210 net/ipv4/ip_sockglue.c:1790 do_sock_getsockopt+0x368/0x440 net/socket.c:2384 __sys_getsockopt net/socket.c:2413 [inline] __do_sys_getsockopt net/socket.c:2423 [inline] __se_sys_getsockopt net/socket.c:2420 [inline] __x64_sys_getsockopt+0x1d6/0x280 net/socket.c:2420 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f8082590c0a Code: ff c3 66 0f 1f 44 00 00 48 c7 c2 a8 ff ff ff f7 d8 64 89 02 b8 ff ff ff ff eb b8 0f 1f 44 00 00 49 89 ca b8 37 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 06 c3 0f 1f 44 00 00 48 c7 c2 a8 ff ff ff f7 RSP: 002b:00007fff00c96d58 EFLAGS: 00000242 ORIG_RAX: 0000000000000037 RAX: ffffffffffffffda RBX: 00007fff00c96d80 RCX: 00007f8082590c0a RDX: 0000000000000040 RSI: 0000000000000000 RDI: 0000000000000003 RBP: 0000000000000003 R08: 00007fff00c96d7c R09: 00007fff00c97197 R10: 00007fff00c96d80 R11: 0000000000000242 R12: 00007f80827b5be0 R13: 00007fff00c96d7c R14: 0000000000000000 R15: 00007f80827b7020