============================================
WARNING: possible recursive locking detected
6.1.90-syzkaller #0 Not tainted
--------------------------------------------
syz-fuzzer/3545 is trying to acquire lock:
ffff8880578b1218 (&qs->lock){-.-.}-{2:2}, at: queue_stack_map_push_elem+0x1ac/0x650 kernel/bpf/queue_stack_maps.c:214
but task is already holding lock:
ffff88805aa8e218 (&qs->lock){-.-.}-{2:2}, at: queue_stack_map_push_elem+0x1ac/0x650 kernel/bpf/queue_stack_maps.c:214
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0
----
lock(&qs->lock);
lock(&qs->lock);
*** DEADLOCK ***
May be due to missing lock nesting notation
4 locks held by syz-fuzzer/3545:
#0: ffffffff8d12ad40 (rcu_callback){....}-{0:0}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
#0: ffffffff8d12ad40 (rcu_callback){....}-{0:0}, at: rcu_do_batch kernel/rcu/tree.c:2291 [inline]
#0: ffffffff8d12ad40 (rcu_callback){....}-{0:0}, at: rcu_core+0xa6b/0x1810 kernel/rcu/tree.c:2556
#1: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
#1: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline]
#1: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2272 [inline]
#1: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run3+0x146/0x440 kernel/trace/bpf_trace.c:2313
#2: ffff88805aa8e218 (&qs->lock){-.-.}-{2:2}, at: queue_stack_map_push_elem+0x1ac/0x650 kernel/bpf/queue_stack_maps.c:214
#3: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
#3: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline]
#3: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2272 [inline]
#3: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x110/0x410 kernel/trace/bpf_trace.c:2312
stack backtrace:
CPU: 0 PID: 3545 Comm: syz-fuzzer Not tainted 6.1.90-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
print_deadlock_bug kernel/locking/lockdep.c:2983 [inline]
check_deadlock kernel/locking/lockdep.c:3026 [inline]
validate_chain+0x4711/0x5950 kernel/locking/lockdep.c:3812
__lock_acquire+0x125b/0x1f80 kernel/locking/lockdep.c:5049
lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0xd1/0x120 kernel/locking/spinlock.c:162
queue_stack_map_push_elem+0x1ac/0x650 kernel/bpf/queue_stack_maps.c:214
bpf_prog_216c997a1f42e404+0x37/0x3b
bpf_dispatcher_nop_func include/linux/bpf.h:989 [inline]
__bpf_prog_run include/linux/filter.h:603 [inline]
bpf_prog_run include/linux/filter.h:610 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:2273 [inline]
bpf_trace_run2+0x1fd/0x410 kernel/trace/bpf_trace.c:2312
trace_contention_end+0x14c/0x190 include/trace/events/lock.h:122
__pv_queued_spin_lock_slowpath+0x935/0xc50 kernel/locking/qspinlock.c:560
pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:591 [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+0x269/0x370 kernel/locking/spinlock_debug.c:115
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline]
_raw_spin_lock_irqsave+0xdd/0x120 kernel/locking/spinlock.c:162
queue_stack_map_push_elem+0x1ac/0x650 kernel/bpf/queue_stack_maps.c:214
bpf_prog_216c997a1f42e404+0x37/0x3b
bpf_dispatcher_nop_func include/linux/bpf.h:989 [inline]
__bpf_prog_run include/linux/filter.h:603 [inline]
bpf_prog_run include/linux/filter.h:610 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:2273 [inline]
bpf_trace_run3+0x231/0x440 kernel/trace/bpf_trace.c:2313
__bpf_trace_kmem_cache_free+0x99/0xc0 include/trace/events/kmem.h:114
trace_kmem_cache_free include/trace/events/kmem.h:114 [inline]
kmem_cache_free+0x418/0x510 mm/slub.c:3682
rcu_do_batch kernel/rcu/tree.c:2296 [inline]
rcu_core+0xad5/0x1810 kernel/rcu/tree.c:2556
__do_softirq+0x2e9/0xa4c kernel/softirq.c:571
invoke_softirq kernel/softirq.c:445 [inline]
__irq_exit_rcu+0x155/0x240 kernel/softirq.c:650
irq_exit_rcu+0x5/0x20 kernel/softirq.c:662
sysvec_apic_timer_interrupt+0x91/0xb0 arch/x86/kernel/apic/apic.c:1106
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:653
RIP: 0010:finish_task_switch+0x1d3/0x810 kernel/sched/core.c:5124
Code: 37 0b 00 48 83 c4 08 4c 89 f7 e8 98 30 00 00 0f 1f 44 00 00 4c 89 f7 e8 7b d0 35 09 e8 36 26 32 00 fb 49 8d bc 24 f8 15 00 00 <48> 89 f8 48 c1 e8 03 49 bd 00 00 00 00 00 fc ff df 42 0f b6 04 28
RSP: 0018:ffffc90003a9fa08 EFLAGS: 00000286
RAX: 87bf047b20b49e00 RBX: ffff88802131d974 RCX: ffffffff91c93103
RDX: dffffc0000000000 RSI: ffffffff8aec01c0 RDI: ffff8880760ed178
RBP: ffffc90003a9fa50 R08: dffffc0000000000 R09: ffffed1017307541
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff8880760ebb80
R13: 1ffff110173076eb R14: ffff8880b983aa00 R15: ffff8880b983b758
context_switch kernel/sched/core.c:5248 [inline]
__schedule+0x1435/0x4550 kernel/sched/core.c:6558
schedule+0xbf/0x180 kernel/sched/core.c:6634
do_nanosleep+0x192/0x5f0 kernel/time/hrtimer.c:2045
hrtimer_nanosleep+0x24d/0x490 kernel/time/hrtimer.c:2098
__do_sys_nanosleep kernel/time/hrtimer.c:2133 [inline]
__se_sys_nanosleep kernel/time/hrtimer.c:2119 [inline]
__x64_sys_nanosleep+0x265/0x2c0 kernel/time/hrtimer.c:2119
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x472757
Code: 8b 44 24 20 b9 40 42 0f 00 f7 f1 48 89 04 24 b8 e8 03 00 00 f7 e2 48 89 44 24 08 48 89 e7 be 00 00 00 00 b8 23 00 00 00 0f 05 <48> 83 c4 10 5d c3 cc cc cc b8 ba 00 00 00 0f 05 89 44 24 08 c3 cc
RSP: 002b:000000c00006bf18 EFLAGS: 00000202 ORIG_RAX: 0000000000000023
RAX: ffffffffffffffda RBX: 0000000000000014 RCX: 0000000000472757
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000000c00006bf18
RBP: 000000c00006bf28 R08: 0000000000000000 R09: 00000000000001c4
R10: 00007fffc09e7080 R11: 0000000000000202 R12: 000000c00006bf18
R13: 000000c0010a5800 R14: 000000c0000064e0 R15: 0000000000000007
----------------
Code disassembly (best guess), 1 bytes skipped:
0: 0b 00 or (%rax),%eax
2: 48 83 c4 08 add $0x8,%rsp
6: 4c 89 f7 mov %r14,%rdi
9: e8 98 30 00 00 call 0x30a6
e: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
13: 4c 89 f7 mov %r14,%rdi
16: e8 7b d0 35 09 call 0x935d096
1b: e8 36 26 32 00 call 0x322656
20: fb sti
21: 49 8d bc 24 f8 15 00 lea 0x15f8(%r12),%rdi
28: 00
* 29: 48 89 f8 mov %rdi,%rax <-- trapping instruction
2c: 48 c1 e8 03 shr $0x3,%rax
30: 49 bd 00 00 00 00 00 movabs $0xdffffc0000000000,%r13
37: fc ff df
3a: 42 0f b6 04 28 movzbl (%rax,%r13,1),%eax