============================================ WARNING: possible recursive locking detected 6.14.0-syzkaller-g8582d9ab3efd #0 Not tainted -------------------------------------------- syz.3.43/6093 is trying to acquire lock: ffffc9000b9b90d8 (&rb->spinlock){-.-.}-{2:2}, at: __bpf_ringbuf_reserve+0x20e/0x650 kernel/bpf/ringbuf.c:423 but task is already holding lock: ffffc9000b9290d8 (&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 6 locks held by syz.3.43/6093: #0: ffff88814d2b9e18 (sk_lock-AF_INET6){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1615 [inline] #0: ffff88814d2b9e18 (sk_lock-AF_INET6){+.+.}-{0:0}, at: sctp_sendmsg+0xf30/0x3620 net/sctp/socket.c:1970 #1: ffffffff8ed3df60 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:331 [inline] #1: ffffffff8ed3df60 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:841 [inline] #1: ffffffff8ed3df60 (rcu_read_lock){....}-{1:3}, at: ip6_route_output_flags+0x30/0x610 net/ipv6/route.c:2650 #2: ffffffff8ed3df60 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:331 [inline] #2: ffffffff8ed3df60 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:841 [inline] #2: ffffffff8ed3df60 (rcu_read_lock){....}-{1:3}, at: ip6_pol_route+0x192/0x15f0 net/ipv6/route.c:2229 #3: ffffffff8ed3df60 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:331 [inline] #3: ffffffff8ed3df60 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:841 [inline] #3: ffffffff8ed3df60 (rcu_read_lock){....}-{1:3}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2362 [inline] #3: ffffffff8ed3df60 (rcu_read_lock){....}-{1:3}, at: bpf_trace_run4+0x246/0x5a0 kernel/trace/bpf_trace.c:2406 #4: ffffc9000b9290d8 (&rb->spinlock){-.-.}-{2:2}, at: __bpf_ringbuf_reserve+0x20e/0x650 kernel/bpf/ringbuf.c:423 #5: ffffffff8ed3df60 (rcu_read_lock){....}-{1:3}, at: trace_call_bpf+0xb9/0x8a0 kernel/trace/bpf_trace.c:-1 stack backtrace: CPU: 0 UID: 0 PID: 6093 Comm: syz.3.43 Not tainted 6.14.0-syzkaller-g8582d9ab3efd #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_ba4789e7f2e155d6+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_reserve kernel/bpf/ringbuf.c:474 [inline] bpf_ringbuf_reserve+0x5c/0x70 kernel/bpf/ringbuf.c:466 bpf_prog_f42551b0fba4abb2+0x2e/0x48 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_trace_run kernel/trace/bpf_trace.c:2363 [inline] bpf_trace_run4+0x336/0x5a0 kernel/trace/bpf_trace.c:2406 __bpf_trace_fib6_table_lookup+0x2b6/0x320 include/trace/events/fib6.h:13 __do_trace_fib6_table_lookup include/trace/events/fib6.h:13 [inline] trace_fib6_table_lookup+0x1a7/0x210 include/trace/events/fib6.h:13 fib6_table_lookup+0xb98/0xbf0 net/ipv6/route.c:2208 ip6_pol_route+0x26d/0x15f0 net/ipv6/route.c:2231 pol_lookup_func include/net/ip6_fib.h:616 [inline] fib6_rule_lookup+0x288/0x7a0 net/ipv6/fib6_rules.c:120 ip6_route_output_flags_noref net/ipv6/route.c:2639 [inline] ip6_route_output_flags+0x38e/0x610 net/ipv6/route.c:2651 ip6_dst_lookup_tail+0x292/0x1510 net/ipv6/ip6_output.c:1156 ip6_dst_lookup_flow+0xbb/0x180 net/ipv6/ip6_output.c:1259 sctp_v6_get_dst+0x7a8/0x1e30 net/sctp/ipv6.c:326 sctp_transport_pmtu+0x129/0x610 net/sctp/transport.c:243 sctp_transport_route+0x19e/0x2e0 net/sctp/transport.c:462 sctp_assoc_add_peer+0x611/0x1360 net/sctp/associola.c:663 sctp_connect_new_asoc+0x361/0x700 net/sctp/socket.c:1099 sctp_sendmsg_new_asoc net/sctp/socket.c:1693 [inline] sctp_sendmsg+0x2009/0x3620 net/sctp/socket.c:2004 sock_sendmsg_nosec net/socket.c:712 [inline] __sock_sendmsg+0x1a6/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/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fb8d818e169 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:00007fb8d9065038 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007fb8d83b5fa0 RCX: 00007fb8d818e169 RDX: 00000000040080c0 RSI: 00002000000003c0 RDI: 0000000000000009 RBP: 00007fb8d8210a68 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fb8d83b5fa0 R15: 00007ffc4bff7d08