============================================ WARNING: possible recursive locking detected 6.12.0-rc1-syzkaller-00163-gb63c755cb65d #0 Not tainted -------------------------------------------- syz.0.83/5558 is trying to acquire lock: ffffc9000d9b10d8 (&rb->spinlock){-.-.}-{2:2}, at: __bpf_ringbuf_reserve+0x1ea/0x600 kernel/bpf/ringbuf.c:427 but task is already holding lock: ffffc9000d8270d8 (&rb->spinlock){-.-.}-{2:2}, at: __bpf_ringbuf_reserve+0x1ea/0x600 kernel/bpf/ringbuf.c:427 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.0.83/5558: #0: ffff88802b574a18 (&sighand->siglock){....}-{2:2}, at: spin_lock_irq include/linux/spinlock.h:376 [inline] #0: ffff88802b574a18 (&sighand->siglock){....}-{2:2}, at: get_signal+0x258/0x1740 kernel/signal.c:2706 #1: ffffffff8e937de0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline] #1: ffffffff8e937de0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #1: ffffffff8e937de0 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2317 [inline] #1: ffffffff8e937de0 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run3+0x24c/0x5a0 kernel/trace/bpf_trace.c:2360 #2: ffffc9000d8270d8 (&rb->spinlock){-.-.}-{2:2}, at: __bpf_ringbuf_reserve+0x1ea/0x600 kernel/bpf/ringbuf.c:427 #3: ffffffff8e937de0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline] #3: ffffffff8e937de0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #3: ffffffff8e937de0 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2317 [inline] #3: ffffffff8e937de0 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1fc/0x540 kernel/trace/bpf_trace.c:2359 stack backtrace: CPU: 1 UID: 0 PID: 5558 Comm: syz.0.83 Not tainted 6.12.0-rc1-syzkaller-00163-gb63c755cb65d #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_deadlock_bug+0x483/0x620 kernel/locking/lockdep.c:3037 check_deadlock kernel/locking/lockdep.c:3089 [inline] validate_chain+0x15e2/0x5920 kernel/locking/lockdep.c:3891 __lock_acquire+0x1384/0x2050 kernel/locking/lockdep.c:5202 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5825 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162 __bpf_ringbuf_reserve+0x1ea/0x600 kernel/bpf/ringbuf.c:427 ____bpf_ringbuf_reserve kernel/bpf/ringbuf.c:478 [inline] bpf_ringbuf_reserve+0x5c/0x70 kernel/bpf/ringbuf.c:470 bpf_prog_fe0ed97373b08409+0x2e/0x4b bpf_dispatcher_nop_func include/linux/bpf.h:1257 [inline] __bpf_prog_run include/linux/filter.h:701 [inline] bpf_prog_run include/linux/filter.h:708 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2318 [inline] bpf_trace_run2+0x2ec/0x540 kernel/trace/bpf_trace.c:2359 trace_contention_end+0x114/0x140 include/trace/events/lock.h:122 __pv_queued_spin_lock_slowpath+0xb7e/0xdb0 kernel/locking/qspinlock.c:557 pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:584 [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+0x272/0x370 kernel/locking/spinlock_debug.c:116 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline] _raw_spin_lock_irqsave+0xe1/0x120 kernel/locking/spinlock.c:162 __bpf_ringbuf_reserve+0x1ea/0x600 kernel/bpf/ringbuf.c:427 ____bpf_ringbuf_reserve kernel/bpf/ringbuf.c:478 [inline] bpf_ringbuf_reserve+0x5c/0x70 kernel/bpf/ringbuf.c:470 bpf_prog_fe0ed97373b08409+0x2e/0x4b bpf_dispatcher_nop_func include/linux/bpf.h:1257 [inline] __bpf_prog_run include/linux/filter.h:701 [inline] bpf_prog_run include/linux/filter.h:708 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2318 [inline] bpf_trace_run3+0x33a/0x5a0 kernel/trace/bpf_trace.c:2360 __traceiter_kmem_cache_free+0x33/0x50 include/trace/events/kmem.h:114 trace_kmem_cache_free include/trace/events/kmem.h:114 [inline] kmem_cache_free+0x355/0x420 mm/slub.c:4681 __sigqueue_free kernel/signal.c:451 [inline] collect_signal kernel/signal.c:594 [inline] __dequeue_signal+0x4ac/0x5c0 kernel/signal.c:616 dequeue_signal+0x1e0/0x680 kernel/signal.c:637 get_signal+0x604/0x1740 kernel/signal.c:2797 arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:337 exit_to_user_mode_loop kernel/entry/common.c:111 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0xc9/0x370 kernel/entry/common.c:218 do_syscall_64+0x100/0x230 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f6a1945cb60 Code: 48 8b 43 38 83 43 28 04 48 8d 50 fc 48 89 53 38 89 68 fc 8b 43 28 48 83 c4 38 5b 5d 41 5c 41 5d 41 5e 41 5f c3 0f 1f 44 00 00 44 24 1e 01 8b 7c 24 18 48 89 d6 48 89 54 24 10 e8 2a 1d fe ff RSP: 002b:00007ffdc1992250 EFLAGS: 00000246 RAX: 000000000001c71c RBX: 00007f6a1a265720 RCX: ffffffff8bcee9f8 RDX: ffffffff8bcee1c0 RSI: ffffffff8bcee9f8 RDI: 00007f6a18c01000 RBP: 0000000000000000 R08: 00007f6a19720000 R09: ffffffff8bceedc2 R10: 000000008bcee9fc R11: 0000000000000009 R12: ffffffff8bceedc2 R13: 00007f6a19736018 R14: 0000000000000008 R15: 000000000000283a