============================================ WARNING: possible recursive locking detected 6.15.0-rc1-syzkaller-00220-g6a325aed130b #0 Not tainted -------------------------------------------- modprobe/12774 is trying to acquire lock: ffffc9000cf070d8 (&rb->spinlock){-.-.}-{2:2}, at: __bpf_ringbuf_reserve+0x20e/0x650 kernel/bpf/ringbuf.c:423 but task is already holding lock: ffffc9000ca570d8 (&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 modprobe/12774: #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: __bpf_trace_run kernel/trace/bpf_trace.c:2362 [inline] #0: ffffffff8ed3dfe0 (rcu_read_lock){....}-{1:3}, at: bpf_trace_run3+0x24e/0x5b0 kernel/trace/bpf_trace.c:2405 #1: ffffc9000ca570d8 (&rb->spinlock){-.-.}-{2:2}, at: __bpf_ringbuf_reserve+0x20e/0x650 kernel/bpf/ringbuf.c:423 #2: ffffffff8ed3dfe0 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:331 [inline] #2: ffffffff8ed3dfe0 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:841 [inline] #2: ffffffff8ed3dfe0 (rcu_read_lock){....}-{1:3}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2362 [inline] #2: ffffffff8ed3dfe0 (rcu_read_lock){....}-{1:3}, at: bpf_trace_run2+0x1fe/0x550 kernel/trace/bpf_trace.c:2404 stack backtrace: CPU: 0 UID: 0 PID: 12774 Comm: modprobe Not tainted 6.15.0-rc1-syzkaller-00220-g6a325aed130b #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_0e153dac479590bf+0x35/0x70 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_run2+0x2ee/0x550 kernel/trace/bpf_trace.c:2404 __bpf_trace_contention_begin+0x172/0x230 include/trace/events/lock.h:95 __do_trace_contention_begin include/trace/events/lock.h:95 [inline] trace_contention_begin+0x11b/0x140 include/trace/events/lock.h:95 __pv_queued_spin_lock_slowpath+0x116/0xdc0 kernel/locking/qspinlock.c:219 pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:572 [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+0x276/0x370 kernel/locking/spinlock_debug.c:116 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline] _raw_spin_lock_irqsave+0xe4/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_fe0ed97373b08409+0x2e/0x4b 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_run3+0x33c/0x5b0 kernel/trace/bpf_trace.c:2405 __do_trace_kmem_cache_free include/trace/events/kmem.h:114 [inline] trace_kmem_cache_free include/trace/events/kmem.h:114 [inline] kmem_cache_free+0x36b/0x410 mm/slub.c:4747 vfs_fstatat+0xe6/0x150 fs/stat.c:369 __do_sys_newfstatat fs/stat.c:532 [inline] __se_sys_newfstatat fs/stat.c:526 [inline] __x64_sys_newfstatat+0x11f/0x1a0 fs/stat.c:526 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:0x7f1b21dc68a9 Code: 49 01 00 09 00 00 00 83 c8 ff c3 48 89 f2 b9 00 01 00 00 48 89 fe bf 9c ff ff ff e9 00 00 00 00 41 89 ca b8 06 01 00 00 0f 05 <45> 31 c0 3d 00 f0 ff ff 76 0c f7 d8 41 83 c8 ff 89 05 a1 49 01 00 RSP: 002b:00007ffc165696c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000106 RAX: ffffffffffffffda RBX: 00007f1b21da1050 RCX: 00007f1b21dc68a9 RDX: 00007ffc16569770 RSI: 00007ffc165696d0 RDI: 00000000ffffff9c RBP: 00007ffc16569830 R08: 0000000000080000 R09: 00007ffc165696d0 R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffc165696d0 R13: 0000000000000005 R14: 00007f1b21dd8a40 R15: 00000000ffffffff