============================================
WARNING: possible recursive locking detected
6.1.92-syzkaller #0 Not tainted
--------------------------------------------
syz-executor.3/9792 is trying to acquire lock:
ffff88805a3bb218 (&qs->lock){..-.}-{2:2}, at: __queue_map_get+0x146/0x4b0 kernel/bpf/queue_stack_maps.c:109
but task is already holding lock:
ffff88805a3bb218 (&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
5 locks held by syz-executor.3/9792:
#0: ffff888055c2ad90 (&u->iolock){+.+.}-{3:3}, at: __unix_dgram_recvmsg+0x24d/0x1260 net/unix/af_unix.c:2443
#1: ffffffff8d12ad40 (rcu_callback){....}-{0:0}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
#1: ffffffff8d12ad40 (rcu_callback){....}-{0:0}, at: rcu_do_batch kernel/rcu/tree.c:2291 [inline]
#1: ffffffff8d12ad40 (rcu_callback){....}-{0:0}, at: rcu_core+0xa6b/0x1810 kernel/rcu/tree.c:2556
#2: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
#2: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline]
#2: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2272 [inline]
#2: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run3+0x146/0x440 kernel/trace/bpf_trace.c:2313
#3: ffff88805a3bb218 (&qs->lock){..-.}-{2:2}, at: queue_stack_map_push_elem+0x1ac/0x650 kernel/bpf/queue_stack_maps.c:214
#4: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
#4: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline]
#4: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2272 [inline]
#4: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x110/0x410 kernel/trace/bpf_trace.c:2312
stack backtrace:
CPU: 0 PID: 9792 Comm: syz-executor.3 Not tainted 6.1.92-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/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_map_get+0x146/0x4b0 kernel/bpf/queue_stack_maps.c:109
bpf_prog_94b194d4ebfffdd5+0x3d/0x41
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:variable_test_bit arch/x86/include/asm/bitops.h:228 [inline]
RIP: 0010:arch_test_bit arch/x86/include/asm/bitops.h:240 [inline]
RIP: 0010:_test_bit include/asm-generic/bitops/instrumented-non-atomic.h:142 [inline]
RIP: 0010:cpumask_test_cpu include/linux/cpumask.h:444 [inline]
RIP: 0010:cpu_online include/linux/cpumask.h:1030 [inline]
RIP: 0010:trace_contention_begin+0x52/0x170 include/trace/events/lock.h:95
Code: b6 04 08 84 c0 75 45 39 1d 43 ef 09 0d 76 35 89 db 48 89 d8 48 c1 e8 06 48 8d 3c c5 68 89 73 8e be 08 00 00 00 e8 0e 72 78 00 <48> 0f a3 1d 0e ed 09 0d 73 09 e8 df a8 09 00 84 c0 74 0b 5b 41 5e
RSP: 0018:ffffc900054775d8 EFLAGS: 00000256
RAX: 0000000000000001 RBX: 0000000000000000 RCX: ffffffff81699c52
RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffffffff8e738968
RBP: ffffc90005477750 R08: dffffc0000000000 R09: fffffbfff1ce712e
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: ffff888055c2ad28 R14: 0000000000000000 R15: 0000000000000000
__mutex_lock_common kernel/locking/mutex.c:605 [inline]
__mutex_lock+0x143/0xd80 kernel/locking/mutex.c:747
__unix_dgram_recvmsg+0x24d/0x1260 net/unix/af_unix.c:2443
____sys_recvmsg+0x285/0x530
___sys_recvmsg net/socket.c:2775 [inline]
do_recvmmsg+0x46d/0xad0 net/socket.c:2869
__sys_recvmmsg net/socket.c:2948 [inline]
__do_sys_recvmmsg net/socket.c:2971 [inline]
__se_sys_recvmmsg net/socket.c:2964 [inline]
__x64_sys_recvmmsg+0x195/0x240 net/socket.c:2964
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:0x7f5d1247cee9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f5d132030c8 EFLAGS: 00000246 ORIG_RAX: 000000000000012b
RAX: ffffffffffffffda RBX: 00007f5d125ac050 RCX: 00007f5d1247cee9
RDX: 0000000000010106 RSI: 00000000200000c0 RDI: 0000000000000003
RBP: 00007f5d124c949e R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000002 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000006e R14: 00007f5d125ac050 R15: 00007ffd0d4e1078
----------------
Code disassembly (best guess):
0: b6 04 mov $0x4,%dh
2: 08 84 c0 75 45 39 1d or %al,0x1d394575(%rax,%rax,8)
9: 43 ef rex.XB out %eax,(%dx)
b: 09 0d 76 35 89 db or %ecx,-0x2476ca8a(%rip) # 0xdb893587
11: 48 89 d8 mov %rbx,%rax
14: 48 c1 e8 06 shr $0x6,%rax
18: 48 8d 3c c5 68 89 73 lea -0x718c7698(,%rax,8),%rdi
1f: 8e
20: be 08 00 00 00 mov $0x8,%esi
25: e8 0e 72 78 00 call 0x787238
* 2a: 48 0f a3 1d 0e ed 09 bt %rbx,0xd09ed0e(%rip) # 0xd09ed40 <-- trapping instruction
31: 0d
32: 73 09 jae 0x3d
34: e8 df a8 09 00 call 0x9a918
39: 84 c0 test %al,%al
3b: 74 0b je 0x48
3d: 5b pop %rbx
3e: 41 5e pop %r14