============================================
WARNING: possible recursive locking detected
6.12.0-rc4-syzkaller-g42f7652d3eb5 #0 Not tainted
--------------------------------------------
syz.0.164/6224 is trying to acquire lock:
ffff88804628f1e0 (&qs->lock){-.-.}-{2:2}, at: __queue_map_get+0x2b8/0x360 kernel/bpf/queue_stack_maps.c:105
but task is already holding lock:
ffff888030a3d1e0 (&qs->lock){-.-.}-{2:2}, at: __queue_map_get+0x2b8/0x360 kernel/bpf/queue_stack_maps.c:105
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
6 locks held by syz.0.164/6224:
#0: ffffffff8e235968 (tracepoints_mutex){+.+.}-{3:3}, at: tracepoint_probe_unregister+0x9c/0xd30 kernel/tracepoint.c:548
#1: ffffffff8e1b8380 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline]
#1: ffffffff8e1b8380 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
#1: ffffffff8e1b8380 (rcu_read_lock){....}-{1:2}, at: ieee80211_iterate_active_interfaces_atomic+0x3e/0x1b0 net/mac80211/util.c:809
#2: ffffffff8f429398 (hwsim_radio_lock){+.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline]
#2: ffffffff8f429398 (hwsim_radio_lock){+.-.}-{2:2}, at: mac80211_hwsim_tx_frame_no_nl.isra.0+0x738/0x12f0 drivers/net/wireless/virtual/mac80211_hwsim.c:1817
#3: ffffffff8e1b8380 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline]
#3: ffffffff8e1b8380 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
#3: ffffffff8e1b8380 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2317 [inline]
#3: ffffffff8e1b8380 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1c2/0x590 kernel/trace/bpf_trace.c:2359
#4: ffff888030a3d1e0 (&qs->lock){-.-.}-{2:2}, at: __queue_map_get+0x2b8/0x360 kernel/bpf/queue_stack_maps.c:105
#5: ffffffff8e1b8380 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline]
#5: ffffffff8e1b8380 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
#5: ffffffff8e1b8380 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2317 [inline]
#5: ffffffff8e1b8380 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1c2/0x590 kernel/trace/bpf_trace.c:2359
stack backtrace:
CPU: 0 UID: 0 PID: 6224 Comm: syz.0.164 Not tainted 6.12.0-rc4-syzkaller-g42f7652d3eb5 #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120
print_deadlock_bug+0x2e3/0x410 kernel/locking/lockdep.c:3037
check_deadlock kernel/locking/lockdep.c:3089 [inline]
validate_chain kernel/locking/lockdep.c:3891 [inline]
__lock_acquire+0x2185/0x3ce0 kernel/locking/lockdep.c:5202
lock_acquire.part.0+0x11b/0x380 kernel/locking/lockdep.c:5825
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0x3a/0x60 kernel/locking/spinlock.c:162
__queue_map_get+0x2b8/0x360 kernel/bpf/queue_stack_maps.c:105
bpf_prog_00798911c748094f+0x43/0x47
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+0x231/0x590 kernel/trace/bpf_trace.c:2359
__bpf_trace_contention_begin+0xca/0x110 include/trace/events/lock.h:95
__traceiter_contention_begin+0x5a/0xa0 include/trace/events/lock.h:95
__preempt_count_dec_and_test arch/x86/include/asm/preempt.h:94 [inline]
trace_contention_begin.constprop.0+0xed/0x170 include/trace/events/lock.h:95
__pv_queued_spin_lock_slowpath+0x10b/0xc90 kernel/locking/qspinlock.c:402
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_map_get+0x2b8/0x360 kernel/bpf/queue_stack_maps.c:105
bpf_prog_00798911c748094f+0x43/0x47
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+0x231/0x590 kernel/trace/bpf_trace.c:2359
__bpf_trace_contention_begin+0xca/0x110 include/trace/events/lock.h:95
__traceiter_contention_begin+0x5a/0xa0 include/trace/events/lock.h:95
__preempt_count_dec_and_test arch/x86/include/asm/preempt.h:94 [inline]
trace_contention_begin.constprop.0+0xed/0x170 include/trace/events/lock.h:95
__pv_queued_spin_lock_slowpath+0x10b/0xc90 kernel/locking/qspinlock.c:402
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
spin_lock include/linux/spinlock.h:351 [inline]
mac80211_hwsim_tx_frame_no_nl.isra.0+0x738/0x12f0 drivers/net/wireless/virtual/mac80211_hwsim.c:1817
mac80211_hwsim_tx_frame+0x1eb/0x2a0 drivers/net/wireless/virtual/mac80211_hwsim.c:2215
__mac80211_hwsim_beacon_tx drivers/net/wireless/virtual/mac80211_hwsim.c:2232 [inline]
mac80211_hwsim_beacon_tx+0x592/0xa00 drivers/net/wireless/virtual/mac80211_hwsim.c:2315
__iterate_interfaces+0x2d0/0x5d0 net/mac80211/util.c:774
ieee80211_iterate_active_interfaces_atomic+0x71/0x1b0 net/mac80211/util.c:810
mac80211_hwsim_beacon+0x105/0x200 drivers/net/wireless/virtual/mac80211_hwsim.c:2345
__run_hrtimer kernel/time/hrtimer.c:1691 [inline]
__hrtimer_run_queues+0x20a/0xae0 kernel/time/hrtimer.c:1755
hrtimer_run_softirq+0x17d/0x350 kernel/time/hrtimer.c:1772
handle_softirqs+0x213/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:1049 [inline]
sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1049
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:get_random_u8+0x43f/0x7f0 drivers/char/random.c:551
Code: fc 4d 85 e4 0f 85 6e 01 00 00 e8 9c 34 7e fc 9c 5b 81 e3 00 02 00 00 31 ff 48 89 de e8 fa 36 7e fc 48 85 db 0f 85 8f 01 00 00 7c 34 7e fc 0f b6 5c 24 40 e8 72 34 7e fc 48 8b 74 24 08 48 b8
RSP: 0018:ffffc9000364f8a8 EFLAGS: 00000293
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff850f4be9
RDX: ffff888023310000 RSI: ffffffff850f4bf7 RDI: 0000000000000007
RBP: ffff88806a63b020 R08: 0000000000000007 R09: 0000000000000000
R10: 0000000000000000 R11: ffffffff961c3c80 R12: 0000000000000200
R13: ffff88806a63b048 R14: ffff88806a600000 R15: ffff88806a63b058
get_random_u32_below include/linux/random.h:78 [inline]
kfence_guarded_alloc mm/kfence/core.c:421 [inline]
__kfence_alloc+0x4e8/0x15f0 mm/kfence/core.c:1136
kfence_alloc include/linux/kfence.h:129 [inline]
slab_alloc_node mm/slub.c:4118 [inline]
__do_kmalloc_node mm/slub.c:4263 [inline]
__kmalloc_noprof+0x28a/0x400 mm/slub.c:4276
kmalloc_noprof include/linux/slab.h:882 [inline]
allocate_probes kernel/tracepoint.c:109 [inline]
func_remove kernel/tracepoint.c:267 [inline]
tracepoint_remove_func kernel/tracepoint.c:403 [inline]
tracepoint_probe_unregister+0x24b/0xd30 kernel/tracepoint.c:551
bpf_raw_tp_link_release+0x35/0x70 kernel/bpf/syscall.c:3475
bpf_link_free+0x12c/0x2b0 kernel/bpf/syscall.c:3005
bpf_link_put_direct kernel/bpf/syscall.c:3045 [inline]
bpf_link_release+0x5d/0x80 kernel/bpf/syscall.c:3052
__fput+0x3f6/0xb60 fs/file_table.c:431
task_work_run+0x14e/0x250 kernel/task_work.c:239
resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
exit_to_user_mode_loop kernel/entry/common.c:114 [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+0x27b/0x2a0 kernel/entry/common.c:218
do_syscall_64+0xda/0x250 arch/x86/entry/common.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fc741d7cef9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe6abcdf88 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4
RAX: 0000000000000000 RBX: 000000000001339d RCX: 00007fc741d7cef9
RDX: 0000000000000000 RSI: 000000000000001e RDI: 0000000000000003
RBP: 00007fc741f37a80 R08: 0000000000000001 R09: 00007ffe6abce27f
R10: 00007fc741c00000 R11: 0000000000000246 R12: 00000000000135c5
R13: 00007ffe6abce090 R14: 0000000000000226 R15: ffffffffffffffff
----------------
Code disassembly (best guess):
0: fc cld
1: 4d 85 e4 test %r12,%r12
4: 0f 85 6e 01 00 00 jne 0x178
a: e8 9c 34 7e fc call 0xfc7e34ab
f: 9c pushf
10: 5b pop %rbx
11: 81 e3 00 02 00 00 and $0x200,%ebx
17: 31 ff xor %edi,%edi
19: 48 89 de mov %rbx,%rsi
1c: e8 fa 36 7e fc call 0xfc7e371b
21: 48 85 db test %rbx,%rbx
24: 0f 85 8f 01 00 00 jne 0x1b9
* 2a: e8 7c 34 7e fc call 0xfc7e34ab <-- trapping instruction
2f: 0f b6 5c 24 40 movzbl 0x40(%rsp),%ebx
34: e8 72 34 7e fc call 0xfc7e34ab
39: 48 8b 74 24 08 mov 0x8(%rsp),%rsi
3e: 48 rex.W
3f: b8 .byte 0xb8