============================================
WARNING: possible recursive locking detected
6.10.0-rc2-syzkaller-00758-gf6afdaf72af7 #0 Not tainted
--------------------------------------------
syz-executor.3/5123 is trying to acquire lock:
ffff88802ea251d8 (&qs->lock){..-.}-{2:2}, at: __stack_map_get+0x14b/0x4b0 kernel/bpf/queue_stack_maps.c:140
but task is already holding lock:
ffff88802ea251d8 (&qs->lock){..-.}-{2:2}, at: queue_stack_map_push_elem+0x1b2/0x660 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
8 locks held by syz-executor.3/5123:
#0: ffffffff8e3dff30 (dup_mmap_sem){++++}-{0:0}, at: dup_mmap kernel/fork.c:637 [inline]
#0: ffffffff8e3dff30 (dup_mmap_sem){++++}-{0:0}, at: dup_mm kernel/fork.c:1688 [inline]
#0: ffffffff8e3dff30 (dup_mmap_sem){++++}-{0:0}, at: copy_mm+0x274/0x2020 kernel/fork.c:1737
#1: ffff888079aa9e18 (&mm->mmap_lock){++++}-{3:3}, at: mmap_write_lock_killable include/linux/mmap_lock.h:122 [inline]
#1: ffff888079aa9e18 (&mm->mmap_lock){++++}-{3:3}, at: dup_mmap kernel/fork.c:638 [inline]
#1: ffff888079aa9e18 (&mm->mmap_lock){++++}-{3:3}, at: dup_mm kernel/fork.c:1688 [inline]
#1: ffff888079aa9e18 (&mm->mmap_lock){++++}-{3:3}, at: copy_mm+0x29c/0x2020 kernel/fork.c:1737
#2: ffff88807d35f398 (&mm->mmap_lock/1){+.+.}-{3:3}, at: mmap_write_lock_nested include/linux/mmap_lock.h:113 [inline]
#2: ffff88807d35f398 (&mm->mmap_lock/1){+.+.}-{3:3}, at: dup_mmap kernel/fork.c:647 [inline]
#2: ffff88807d35f398 (&mm->mmap_lock/1){+.+.}-{3:3}, at: dup_mm kernel/fork.c:1688 [inline]
#2: ffff88807d35f398 (&mm->mmap_lock/1){+.+.}-{3:3}, at: copy_mm+0x3e0/0x2020 kernel/fork.c:1737
#3: ffffffff8e333fa0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline]
#3: ffffffff8e333fa0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline]
#3: ffffffff8e333fa0 (rcu_read_lock){....}-{1:2}, at: page_ext_get+0x20/0x2a0 mm/page_ext.c:521
#4: ffff888140e8ba98 (_xmit_ETHER#2){+.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline]
#4: ffff888140e8ba98 (_xmit_ETHER#2){+.-.}-{2:2}, at: __netif_tx_lock include/linux/netdevice.h:4347 [inline]
#4: ffff888140e8ba98 (_xmit_ETHER#2){+.-.}-{2:2}, at: virtnet_poll_tx+0x202/0x730 drivers/net/virtio_net.c:2472
#5: ffffffff8e333fa0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline]
#5: ffffffff8e333fa0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline]
#5: ffffffff8e333fa0 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2405 [inline]
#5: ffffffff8e333fa0 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run3+0x24c/0x5a0 kernel/trace/bpf_trace.c:2448
#6: ffff88802ea251d8 (&qs->lock){..-.}-{2:2}, at: queue_stack_map_push_elem+0x1b2/0x660 kernel/bpf/queue_stack_maps.c:210
#7: ffffffff8e333fa0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline]
#7: ffffffff8e333fa0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline]
#7: ffffffff8e333fa0 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2405 [inline]
#7: ffffffff8e333fa0 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1fc/0x540 kernel/trace/bpf_trace.c:2447
stack backtrace:
CPU: 1 PID: 5123 Comm: syz-executor.3 Not tainted 6.10.0-rc2-syzkaller-00758-gf6afdaf72af7 #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+0x241/0x360 lib/dump_stack.c:114
check_deadlock kernel/locking/lockdep.c:3062 [inline]
validate_chain+0x15d3/0x5900 kernel/locking/lockdep.c:3856
__lock_acquire+0x1346/0x1fd0 kernel/locking/lockdep.c:5137
lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162
__stack_map_get+0x14b/0x4b0 kernel/bpf/queue_stack_maps.c:140
bpf_prog_94b194d4ebfffdd5+0x45/0x49
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:2406 [inline]
bpf_trace_run2+0x2ec/0x540 kernel/trace/bpf_trace.c:2447
trace_contention_end+0x114/0x140 include/trace/events/lock.h:122
__pv_queued_spin_lock_slowpath+0xb81/0xdc0 kernel/locking/qspinlock.c:557
pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:584 [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+0x272/0x370 kernel/locking/spinlock_debug.c:116
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline]
_raw_spin_lock_irqsave+0xe1/0x120 kernel/locking/spinlock.c:162
queue_stack_map_push_elem+0x1b2/0x660 kernel/bpf/queue_stack_maps.c:210
bpf_prog_216c997a1f42e404+0x3f/0x43
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:2406 [inline]
bpf_trace_run3+0x33a/0x5a0 kernel/trace/bpf_trace.c:2448
trace_kmem_cache_free include/trace/events/kmem.h:114 [inline]
kmem_cache_free+0x2a9/0x350 mm/slub.c:4510
skb_kfree_head net/core/skbuff.c:1067 [inline]
skb_free_head net/core/skbuff.c:1081 [inline]
skb_release_data+0x64d/0x880 net/core/skbuff.c:1108
skb_release_all net/core/skbuff.c:1173 [inline]
napi_consume_skb+0x146/0x1f0 net/core/skbuff.c:1489
__free_old_xmit+0x184/0x420 drivers/net/virtio_net.c:524
free_old_xmit drivers/net/virtio_net.c:962 [inline]
virtnet_poll_tx+0x27a/0x730 drivers/net/virtio_net.c:2474
__napi_poll+0xcb/0x490 net/core/dev.c:6722
napi_poll net/core/dev.c:6791 [inline]
net_rx_action+0x7bb/0x10a0 net/core/dev.c:6907
handle_softirqs+0x2c4/0x970 kernel/softirq.c:554
__do_softirq kernel/softirq.c:588 [inline]
invoke_softirq kernel/softirq.c:428 [inline]
__irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637
irq_exit_rcu+0x9/0x30 kernel/softirq.c:649
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline]
sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1043
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:lock_acquire+0x264/0x550 kernel/locking/lockdep.c:5758
Code: 2b 00 74 08 4c 89 f7 e8 fa a5 89 00 f6 44 24 61 02 0f 85 85 01 00 00 41 f7 c7 00 02 00 00 74 01 fb 48 c7 44 24 40 0e 36 e0 45 <4b> c7 44 25 00 00 00 00 00 43 c7 44 25 09 00 00 00 00 43 c7 44 25
RSP: 0018:ffffc900035aec40 EFLAGS: 00000206
RAX: 0000000000000001 RBX: 1ffff920006b5d94 RCX: 0000000000000001
RDX: dffffc0000000000 RSI: ffffffff8bcacd00 RDI: ffffffff8c1ff740
RBP: ffffc900035aed98 R08: ffffffff92faf587 R09: 1ffffffff25f5eb0
R10: dffffc0000000000 R11: fffffbfff25f5eb1 R12: 1ffff920006b5d90
R13: dffffc0000000000 R14: ffffc900035aeca0 R15: 0000000000000246
rcu_lock_acquire include/linux/rcupdate.h:329 [inline]
rcu_read_lock include/linux/rcupdate.h:781 [inline]
page_ext_get+0x3d/0x2a0 mm/page_ext.c:521
__page_table_check_zero+0xb1/0x340 mm/page_table_check.c:142
page_table_check_alloc include/linux/page_table_check.h:33 [inline]
post_alloc_hook+0x206/0x230 mm/page_alloc.c:1469
prep_new_page mm/page_alloc.c:1476 [inline]
get_page_from_freelist+0x2e2d/0x2ee0 mm/page_alloc.c:3402
__alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4660
alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2265
pagetable_alloc_noprof include/linux/mm.h:2903 [inline]
pmd_alloc_one_noprof include/asm-generic/pgalloc.h:138 [inline]
__pmd_alloc+0x91/0x630 mm/memory.c:5925
pmd_alloc include/linux/mm.h:2866 [inline]
copy_pmd_range+0x8001/0x84c0 mm/memory.c:1220
copy_pud_range mm/memory.c:1277 [inline]
copy_p4d_range mm/memory.c:1301 [inline]
copy_page_range+0x99f/0xe90 mm/memory.c:1399
dup_mmap kernel/fork.c:751 [inline]
dup_mm kernel/fork.c:1688 [inline]
copy_mm+0x128d/0x2020 kernel/fork.c:1737
copy_process+0x187a/0x3dc0 kernel/fork.c:2390
kernel_clone+0x226/0x8f0 kernel/fork.c:2797
__do_sys_clone kernel/fork.c:2940 [inline]
__se_sys_clone kernel/fork.c:2924 [inline]
__x64_sys_clone+0x258/0x2a0 kernel/fork.c:2924
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7ff037a79f53
Code: 1f 84 00 00 00 00 00 64 48 8b 04 25 10 00 00 00 45 31 c0 31 d2 31 f6 bf 11 00 20 01 4c 8d 90 d0 02 00 00 b8 38 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 35 89 c2 85 c0 75 2c 64 48 8b 04 25 10 00 00
RSP: 002b:00007ffde4182ee8 EFLAGS: 00000246 ORIG_RAX: 0000000000000038
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007ff037a79f53
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000001200011
RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000
R10: 000055556d0c0750 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000001 R15: 0000000000000001
----------------
Code disassembly (best guess):
0: 2b 00 sub (%rax),%eax
2: 74 08 je 0xc
4: 4c 89 f7 mov %r14,%rdi
7: e8 fa a5 89 00 call 0x89a606
c: f6 44 24 61 02 testb $0x2,0x61(%rsp)
11: 0f 85 85 01 00 00 jne 0x19c
17: 41 f7 c7 00 02 00 00 test $0x200,%r15d
1e: 74 01 je 0x21
20: fb sti
21: 48 c7 44 24 40 0e 36 movq $0x45e0360e,0x40(%rsp)
28: e0 45
* 2a: 4b c7 44 25 00 00 00 movq $0x0,0x0(%r13,%r12,1) <-- trapping instruction
31: 00 00
33: 43 c7 44 25 09 00 00 movl $0x0,0x9(%r13,%r12,1)
3a: 00 00
3c: 43 rex.XB
3d: c7 .byte 0xc7
3e: 44 rex.R
3f: 25 .byte 0x25