============================================
WARNING: possible recursive locking detected
6.12.0-rc5-syzkaller-00005-ge42b1a9a2557 #0 Not tainted
--------------------------------------------
syz.5.1301/12177 is trying to acquire lock:
ffffc90007f910d8 (&rb->spinlock){-.-.}-{2:2}, at: __bpf_ringbuf_reserve+0x36e/0x4b0 kernel/bpf/ringbuf.c:427
but task is already holding lock:
ffffc900041b10d8 (&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
5 locks held by syz.5.1301/12177:
#0: ffffffff8ddb7800 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline]
#0: ffffffff8ddb7800 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
#0: ffffffff8ddb7800 (rcu_read_lock){....}-{1:2}, at: ieee80211_rx_napi+0xa6/0x400 net/mac80211/rx.c:5484
#1: ffff88805b960168 (&rdev->bss_lock){+.-.}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:356 [inline]
#1: ffff88805b960168 (&rdev->bss_lock){+.-.}-{2:2}, at: cfg80211_inform_single_bss_data+0x758/0x1e40 net/wireless/scan.c:2328
#2: ffffffff8ddb7800 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline]
#2: ffffffff8ddb7800 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
#2: ffffffff8ddb7800 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2315 [inline]
#2: ffffffff8ddb7800 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1c2/0x590 kernel/trace/bpf_trace.c:2357
#3: ffffc900041b10d8 (&rb->spinlock){-.-.}-{2:2}, at: __bpf_ringbuf_reserve+0x36e/0x4b0 kernel/bpf/ringbuf.c:427
#4: ffffffff8ddb7800 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline]
#4: ffffffff8ddb7800 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
#4: ffffffff8ddb7800 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2315 [inline]
#4: ffffffff8ddb7800 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1c2/0x590 kernel/trace/bpf_trace.c:2357
stack backtrace:
CPU: 1 UID: 0 PID: 12177 Comm: syz.5.1301 Not tainted 6.12.0-rc5-syzkaller-00005-ge42b1a9a2557 #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:1265 [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:2316 [inline]
bpf_trace_run2+0x231/0x590 kernel/trace/bpf_trace.c:2357
__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_9efe54833449f08e+0x2e/0x48
bpf_dispatcher_nop_func include/linux/bpf.h:1265 [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:2316 [inline]
bpf_trace_run2+0x231/0x590 kernel/trace/bpf_trace.c:2357
trace_kfree include/trace/events/kmem.h:94 [inline]
kfree+0x258/0x4b0 mm/slub.c:4714
ieee80211_inform_bss+0xa36/0x10f0 net/mac80211/scan.c:160
rdev_inform_bss net/wireless/rdev-ops.h:418 [inline]
cfg80211_inform_single_bss_data+0x8b1/0x1e40 net/wireless/scan.c:2333
cfg80211_inform_bss_data+0x254/0x3e30 net/wireless/scan.c:3184
cfg80211_inform_bss_frame_data+0x253/0x8a0 net/wireless/scan.c:3279
ieee80211_bss_info_update+0x311/0xab0 net/mac80211/scan.c:226
ieee80211_scan_rx+0x474/0xac0 net/mac80211/scan.c:340
__ieee80211_rx_handle_packet net/mac80211/rx.c:5225 [inline]
ieee80211_rx_list+0x1bb8/0x2ec0 net/mac80211/rx.c:5462
ieee80211_rx_napi+0xdd/0x400 net/mac80211/rx.c:5485
ieee80211_rx include/net/mac80211.h:5138 [inline]
ieee80211_handle_queued_frames+0xd5/0x130 net/mac80211/main.c:439
tasklet_action_common+0x24c/0x3e0 kernel/softirq.c:784
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:finish_task_switch.isra.0+0x220/0xcc0 kernel/sched/core.c:5202
Code: a9 0a 00 00 44 8b 0d 47 cd c0 0e 45 85 c9 0f 85 c0 01 00 00 48 89 df e8 ae f8 ff ff e8 89 fe 37 00 fb 65 48 8b 1d 70 8b a7 7e <48> 8d bb f8 15 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1
RSP: 0018:ffffc90006bdf6f0 EFLAGS: 00000206
RAX: 000000000000a3b7 RBX: ffff888021de4880 RCX: 1ffffffff2039509
RDX: 0000000000000000 RSI: ffffffff8b4cc8e0 RDI: ffffffff8bb12fe0
RBP: ffffc90006bdf738 R08: 0000000000000001 R09: 0000000000000001
R10: ffffffff901cea8f R11: 0000000000000000 R12: ffff88802b53fca0
R13: ffff88801b74c880 R14: ffff88806a76df00 R15: ffff88802b43ee80
context_switch kernel/sched/core.c:5331 [inline]
__schedule+0xe5d/0x5730 kernel/sched/core.c:6690
__schedule_loop kernel/sched/core.c:6767 [inline]
schedule+0xe7/0x350 kernel/sched/core.c:6782
schedule_timeout+0x258/0x2a0 kernel/time/timer.c:2591
do_wait_for_common kernel/sched/completion.c:95 [inline]
__wait_for_common+0x3e1/0x600 kernel/sched/completion.c:116
rdmsr_safe_on_cpu+0x1c3/0x1f0 arch/x86/lib/msr-smp.c:181
msr_read+0x19e/0x250 arch/x86/kernel/msr.c:66
vfs_read+0x1df/0xbe0 fs/read_write.c:567
ksys_read+0x12f/0x260 fs/read_write.c:712
do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline]
__do_fast_syscall_32+0x73/0x120 arch/x86/entry/common.c:386
do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411
entry_SYSENTER_compat_after_hwframe+0x84/0x8e
RIP: 0023:0xf7f34579
Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00
RSP: 002b:00000000f56b655c EFLAGS: 00000296 ORIG_RAX: 0000000000000003
RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 0000000020019680
RDX: 0000000000018ff8 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000296 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
----------------
Code disassembly (best guess):
0: a9 0a 00 00 44 test $0x4400000a,%eax
5: 8b 0d 47 cd c0 0e mov 0xec0cd47(%rip),%ecx # 0xec0cd52
b: 45 85 c9 test %r9d,%r9d
e: 0f 85 c0 01 00 00 jne 0x1d4
14: 48 89 df mov %rbx,%rdi
17: e8 ae f8 ff ff call 0xfffff8ca
1c: e8 89 fe 37 00 call 0x37feaa
21: fb sti
22: 65 48 8b 1d 70 8b a7 mov %gs:0x7ea78b70(%rip),%rbx # 0x7ea78b9a
29: 7e
* 2a: 48 8d bb f8 15 00 00 lea 0x15f8(%rbx),%rdi <-- trapping instruction
31: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
38: fc ff df
3b: 48 89 fa mov %rdi,%rdx
3e: 48 rex.W
3f: c1 .byte 0xc1