============================================
WARNING: possible recursive locking detected
6.12.0-rc3-syzkaller-00454-gdb87114dcf13 #0 Not tainted
--------------------------------------------
syz.3.937/8729 is trying to acquire lock:
ffffc9002d5090d8 (&rb->spinlock){-.-.}-{2:2}, at: __bpf_ringbuf_reserve+0x36e/0x4b0 kernel/bpf/ringbuf.c:427
but task is already holding lock:
ffffc90023dd50d8 (&rb->spinlock){-.-.}-{2:2}, at: __bpf_ringbuf_reserve+0x36e/0x4b0 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.3.937/8729:
#0: ffffffff8ddb7840 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline]
#0: ffffffff8ddb7840 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
#0: ffffffff8ddb7840 (rcu_read_lock){....}-{1:2}, at: ieee80211_iterate_active_interfaces_atomic+0x3e/0x1b0 net/mac80211/util.c:809
#1: ffffffff8ddb7840 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline]
#1: ffffffff8ddb7840 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
#1: ffffffff8ddb7840 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2317 [inline]
#1: ffffffff8ddb7840 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run3+0x1d1/0x5a0 kernel/trace/bpf_trace.c:2360
#2: ffffc90023dd50d8 (&rb->spinlock){-.-.}-{2:2}, at: __bpf_ringbuf_reserve+0x36e/0x4b0 kernel/bpf/ringbuf.c:427
#3: ffffffff8ddb7840 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline]
#3: ffffffff8ddb7840 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
#3: ffffffff8ddb7840 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2317 [inline]
#3: ffffffff8ddb7840 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1c2/0x590 kernel/trace/bpf_trace.c:2359
stack backtrace:
CPU: 0 UID: 0 PID: 8729 Comm: syz.3.937 Not tainted 6.12.0-rc3-syzkaller-00454-gdb87114dcf13 #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
__bpf_ringbuf_reserve+0x36e/0x4b0 kernel/bpf/ringbuf.c:427
____bpf_ringbuf_reserve kernel/bpf/ringbuf.c:478 [inline]
bpf_ringbuf_reserve+0x57/0x90 kernel/bpf/ringbuf.c:470
bpf_prog_0e153dac479590bf+0x35/0x70
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
__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
__bpf_ringbuf_reserve+0x36e/0x4b0 kernel/bpf/ringbuf.c:427
____bpf_ringbuf_reserve kernel/bpf/ringbuf.c:478 [inline]
bpf_ringbuf_reserve+0x57/0x90 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+0x240/0x5a0 kernel/trace/bpf_trace.c:2360
trace_kmem_cache_free include/trace/events/kmem.h:114 [inline]
kmem_cache_free+0x200/0x4b0 mm/slub.c:4680
kfree_skbmem+0x1a4/0x1f0 net/core/skbuff.c:1148
__kfree_skb net/core/skbuff.c:1205 [inline]
consume_skb net/core/skbuff.c:1436 [inline]
consume_skb+0xcc/0x100 net/core/skbuff.c:1430
mac80211_hwsim_tx_frame+0x1f3/0x2a0 drivers/net/wireless/virtual/mac80211_hwsim.c:2216
__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:exit_to_user_mode_loop kernel/entry/common.c:101 [inline]
RIP: 0010:exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
RIP: 0010:irqentry_exit_to_user_mode+0x120/0x280 kernel/entry/common.c:231
Code: 9c 58 fa f6 c4 02 0f 85 18 01 00 00 e8 69 0e 00 00 48 8b 5d 00 f7 c3 0e 30 02 00 0f 84 2b ff ff ff e8 14 c8 80 f6 fb f6 c3 08 <75> bd f6 c7 10 74 c2 4c 89 e7 e8 d1 03 ac f6 f7 c3 04 00 02 00 74
RSP: 0000:ffffc9000439ff38 EFLAGS: 00000202
RAX: 000000000000596d RBX: 0000000020000008 RCX: 1ffffffff2039471
RDX: 0000000000000000 RSI: ffffffff8b4cc960 RDI: ffffffff8bb12da0
RBP: ffff888023ddc880 R08: 0000000000000001 R09: 0000000000000001
R10: ffffffff901ce5cf R11: 0000000000000000 R12: ffffc9000439ff58
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
asm_sysvec_reschedule_ipi+0x1a/0x20 arch/x86/include/asm/idtentry.h:707
RIP: 0023:0xf717fbd9
Code: 10 89 74 24 14 8d 74 26 00 8b 45 08 8b 4d 0c 83 c5 08 89 ce 39 d0 19 fe 72 ef 89 44 24 0c 8b 44 24 10 89 4c 24 10 8b 74 24 14 <83> e8 08 89 f9 39 f2 19 d9 73 15 8d 74 26 00 8b 70 f8 8b 58 fc 83
RSP: 002b:00000000ffab6e10 EFLAGS: 00000246
RAX: 00000000f6d0f788 RBX: 00000000ffffffff RCX: 0000000000000000
RDX: 0000000088e461bd RSI: 0000000088e461bd RDI: 00000000ffffffff
RBP: 00000000f6d0f670 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
----------------
Code disassembly (best guess):
0: 9c pushf
1: 58 pop %rax
2: fa cli
3: f6 c4 02 test $0x2,%ah
6: 0f 85 18 01 00 00 jne 0x124
c: e8 69 0e 00 00 call 0xe7a
11: 48 8b 5d 00 mov 0x0(%rbp),%rbx
15: f7 c3 0e 30 02 00 test $0x2300e,%ebx
1b: 0f 84 2b ff ff ff je 0xffffff4c
21: e8 14 c8 80 f6 call 0xf680c83a
26: fb sti
27: f6 c3 08 test $0x8,%bl
* 2a: 75 bd jne 0xffffffe9 <-- trapping instruction
2c: f6 c7 10 test $0x10,%bh
2f: 74 c2 je 0xfffffff3
31: 4c 89 e7 mov %r12,%rdi
34: e8 d1 03 ac f6 call 0xf6ac040a
39: f7 c3 04 00 02 00 test $0x20004,%ebx
3f: 74 .byte 0x74