============================================
WARNING: possible recursive locking detected
6.10.0-rc5-syzkaller #0 Not tainted
--------------------------------------------
syz-executor.3/8125 is trying to acquire lock:
ffff8880250911d8 (&qs->lock){-.-.}-{2:2}, at: __stack_map_get+0x2a8/0x350 kernel/bpf/queue_stack_maps.c:140
but task is already holding lock:
ffff8880250911d8 (&qs->lock){-.-.}-{2:2}, at: queue_stack_map_push_elem+0x353/0x420 kernel/bpf/queue_stack_maps.c:210
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/8125:
#0: ffff88802435ba90 (&vma->vm_lock->lock){++++}-{3:3}, at: vma_start_read include/linux/mm.h:678 [inline]
#0: ffff88802435ba90 (&vma->vm_lock->lock){++++}-{3:3}, at: lock_vma_under_rcu+0x1e2/0x8f0 mm/memory.c:5844
#1: ffffffff8dbb1920 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline]
#1: ffffffff8dbb1920 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline]
#1: ffffffff8dbb1920 (rcu_read_lock){....}-{1:2}, at: ieee80211_iterate_active_interfaces_atomic+0x3e/0x1b0 net/mac80211/util.c:807
#2: ffffffff8dbb1920 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline]
#2: ffffffff8dbb1920 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline]
#2: ffffffff8dbb1920 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2402 [inline]
#2: ffffffff8dbb1920 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run3+0x1d1/0x5a0 kernel/trace/bpf_trace.c:2445
#3: ffff8880250911d8 (&qs->lock){-.-.}-{2:2}, at: queue_stack_map_push_elem+0x353/0x420 kernel/bpf/queue_stack_maps.c:210
#4: ffffffff8dbb1920 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline]
#4: ffffffff8dbb1920 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline]
#4: ffffffff8dbb1920 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2402 [inline]
#4: ffffffff8dbb1920 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1c2/0x590 kernel/trace/bpf_trace.c:2444
stack backtrace:
CPU: 0 PID: 8125 Comm: syz-executor.3 Not tainted 6.10.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114
check_deadlock kernel/locking/lockdep.c:3062 [inline]
validate_chain kernel/locking/lockdep.c:3856 [inline]
__lock_acquire+0x20e6/0x3b30 kernel/locking/lockdep.c:5137
lock_acquire kernel/locking/lockdep.c:5754 [inline]
lock_acquire+0x1b1/0x560 kernel/locking/lockdep.c:5719
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0x3a/0x60 kernel/locking/spinlock.c:162
__stack_map_get+0x2a8/0x350 kernel/bpf/queue_stack_maps.c:140
___bpf_prog_run+0x3e51/0xabd0 kernel/bpf/core.c:2012
__bpf_prog_run32+0xc1/0x100 kernel/bpf/core.c:2253
bpf_dispatcher_nop_func include/linux/bpf.h:1243 [inline]
__bpf_prog_run include/linux/filter.h:691 [inline]
bpf_prog_run include/linux/filter.h:698 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:2403 [inline]
bpf_trace_run2+0x231/0x590 kernel/trace/bpf_trace.c:2444
__bpf_trace_contention_end+0xca/0x110 include/trace/events/lock.h:122
trace_contention_end.constprop.0+0xea/0x170 include/trace/events/lock.h:122
__pv_queued_spin_lock_slowpath+0x28e/0xcc0 kernel/locking/qspinlock.c:557
pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:584 [inline]
queued_spin_lock_slowpath arch/x86/include/asm/qspinlock.h:51 [inline]
queued_spin_lock include/asm-generic/qspinlock.h:114 [inline]
do_raw_spin_lock+0x210/0x2c0 kernel/locking/spinlock_debug.c:116
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline]
_raw_spin_lock_irqsave+0x42/0x60 kernel/locking/spinlock.c:162
queue_stack_map_push_elem+0x353/0x420 kernel/bpf/queue_stack_maps.c:210
___bpf_prog_run+0x3e51/0xabd0 kernel/bpf/core.c:2012
__bpf_prog_run32+0xc1/0x100 kernel/bpf/core.c:2253
bpf_dispatcher_nop_func include/linux/bpf.h:1243 [inline]
__bpf_prog_run include/linux/filter.h:691 [inline]
bpf_prog_run include/linux/filter.h:698 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:2403 [inline]
bpf_trace_run3+0x240/0x5a0 kernel/trace/bpf_trace.c:2445
trace_kmem_cache_free include/trace/events/kmem.h:114 [inline]
kmem_cache_free+0x1dd/0x3a0 mm/slub.c:4511
skb_kfree_head net/core/skbuff.c:1067 [inline]
skb_kfree_head net/core/skbuff.c:1064 [inline]
skb_free_head+0x18a/0x1d0 net/core/skbuff.c:1081
skb_release_data+0x75c/0x980 net/core/skbuff.c:1108
skb_release_all net/core/skbuff.c:1173 [inline]
__kfree_skb net/core/skbuff.c:1187 [inline]
consume_skb net/core/skbuff.c:1409 [inline]
consume_skb+0xd0/0x170 net/core/skbuff.c:1403
mac80211_hwsim_tx_frame+0x1f3/0x2a0 drivers/net/wireless/virtual/mac80211_hwsim.c:2207
__mac80211_hwsim_beacon_tx drivers/net/wireless/virtual/mac80211_hwsim.c:2223 [inline]
mac80211_hwsim_beacon_tx+0x592/0xa00 drivers/net/wireless/virtual/mac80211_hwsim.c:2306
__iterate_interfaces+0x2d2/0x580 net/mac80211/util.c:772
ieee80211_iterate_active_interfaces_atomic+0x71/0x1b0 net/mac80211/util.c:808
mac80211_hwsim_beacon+0x105/0x200 drivers/net/wireless/virtual/mac80211_hwsim.c:2336
__run_hrtimer kernel/time/hrtimer.c:1687 [inline]
__hrtimer_run_queues+0x20c/0xcc0 kernel/time/hrtimer.c:1751
hrtimer_run_softirq+0x17d/0x350 kernel/time/hrtimer.c:1768
handle_softirqs+0x216/0x8f0 kernel/softirq.c:554
__do_softirq kernel/softirq.c:588 [inline]
invoke_softirq kernel/softirq.c:428 [inline]
__irq_exit_rcu kernel/softirq.c:637 [inline]
irq_exit_rcu+0xbb/0x120 kernel/softirq.c:649
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline]
sysvec_apic_timer_interrupt+0x95/0xb0 arch/x86/kernel/apic/apic.c:1043
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:__sanitizer_cov_trace_pc+0x0/0x60 kernel/kcov.c:200
Code: be b0 01 00 00 e8 a0 ff ff ff 31 c0 c3 cc cc cc cc 66 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 0f 1e fa 65 48 8b 15 14 f5 75 7e 65 8b 05 15 f5 75 7e a9 00 01
RSP: 0000:ffffc9000332f2c8 EFLAGS: 00000287
RAX: 0000000000000000 RBX: ffffffff90678b50 RCX: ffffffff813ccc24
RDX: ffff88801c795a00 RSI: ffffffff8ae7330b RDI: 0000000000000006
RBP: ffffffff90678bac R08: 0000000000000006 R09: ffffffff8ae7330b
R10: ffffffff8ae73350 R11: dffffc0000000000 R12: ffffffff8ae7330b
R13: ffffffff8ae73350 R14: dffffc0000000000 R15: ffffffff90678b7c
__orc_find+0xce/0x130 arch/x86/kernel/unwind_orc.c:106
orc_find arch/x86/kernel/unwind_orc.c:227 [inline]
unwind_next_frame+0x335/0x23a0 arch/x86/kernel/unwind_orc.c:494
arch_stack_walk+0x100/0x170 arch/x86/kernel/stacktrace.c:25
stack_trace_save+0x95/0xd0 kernel/stacktrace.c:122
save_stack+0x162/0x1f0 mm/page_owner.c:156
__set_page_owner+0x8b/0x560 mm/page_owner.c:320
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1468
prep_new_page mm/page_alloc.c:1476 [inline]
get_page_from_freelist+0x136a/0x2e50 mm/page_alloc.c:3420
__alloc_pages_noprof+0x22b/0x2460 mm/page_alloc.c:4678
alloc_pages_mpol_noprof+0x275/0x610 mm/mempolicy.c:2265
vma_alloc_folio_noprof+0xad/0x1f0 mm/mempolicy.c:2304
folio_prealloc mm/memory.c:1050 [inline]
wp_page_copy mm/memory.c:3285 [inline]
do_wp_page+0x1acd/0x3340 mm/memory.c:3677
handle_pte_fault mm/memory.c:5396 [inline]
__handle_mm_fault+0x2311/0x5410 mm/memory.c:5523
handle_mm_fault+0x476/0xa00 mm/memory.c:5688
do_user_addr_fault+0x426/0xe50 arch/x86/mm/fault.c:1338
handle_page_fault arch/x86/mm/fault.c:1481 [inline]
exc_page_fault+0x5c/0xc0 arch/x86/mm/fault.c:1539
asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623
RIP: 0033:0x7f069d2368f8
Code: 4c 06 08 85 c9 0f 85 ce 0a 00 00 48 89 fe 31 c0 b9 40 42 0f 00 c7 07 01 00 00 00 ba 81 00 00 00 bf ca 00 00 00 e8 98 67 04 00 <83> 05 8d f0 17 00 01 80 bc 24 d8 00 00 00 00 0f b6 05 a4 ed ca 00
RSP: 002b:00007ffe57ec5d10 EFLAGS: 00010217
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007f069d27d0a9
RDX: 00000000000f4240 RSI: 0000000000000081 RDI: 00007f069d3b3f88
RBP: 0000000000000fa6 R08: 00007ffe57ec5c27 R09: 0000000100000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f069d3b3f80
R13: 00007f069d3b3f8c R14: 0000000000000000 R15: 00007f069d3b3f80
----------------
Code disassembly (best guess):
0: be b0 01 00 00 mov $0x1b0,%esi
5: e8 a0 ff ff ff call 0xffffffaa
a: 31 c0 xor %eax,%eax
c: c3 ret
d: cc int3
e: cc int3
f: cc int3
10: cc int3
11: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1)
18: 00 00
1a: 90 nop
1b: 90 nop
1c: 90 nop
1d: 90 nop
1e: 90 nop
1f: 90 nop
20: 90 nop
21: 90 nop
22: 90 nop
23: 90 nop
24: 90 nop
25: 90 nop
26: 90 nop
27: 90 nop
28: 90 nop
29: 90 nop
* 2a: f3 0f 1e fa endbr64 <-- trapping instruction
2e: 65 48 8b 15 14 f5 75 mov %gs:0x7e75f514(%rip),%rdx # 0x7e75f54a
35: 7e
36: 65 8b 05 15 f5 75 7e mov %gs:0x7e75f515(%rip),%eax # 0x7e75f552
3d: a9 .byte 0xa9
3e: 00 01 add %al,(%rcx)