============================================ WARNING: possible recursive locking detected 6.10.0-rc4-syzkaller-00177-g058722ee350c #0 Not tainted -------------------------------------------- syz-executor.4/5785 is trying to acquire lock: ffff88805debb1d8 (&qs->lock){..-.}-{2:2}, at: __stack_map_get+0x14b/0x4b0 kernel/bpf/queue_stack_maps.c:140 but task is already holding lock: ffff88805debb1d8 (&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 4 locks held by syz-executor.4/5785: #0: ffff88807ab21498 (&mm->mmap_lock){++++}-{3:3}, at: mmap_write_lock include/linux/mmap_lock.h:106 [inline] #0: ffff88807ab21498 (&mm->mmap_lock){++++}-{3:3}, at: exit_mmap+0x2a9/0xc80 mm/mmap.c:3349 #1: ffffffff8e333fa0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #1: ffffffff8e333fa0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #1: ffffffff8e333fa0 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2402 [inline] #1: ffffffff8e333fa0 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run3+0x24c/0x5a0 kernel/trace/bpf_trace.c:2445 #2: ffff88805debb1d8 (&qs->lock){..-.}-{2:2}, at: queue_stack_map_push_elem+0x1b2/0x660 kernel/bpf/queue_stack_maps.c:210 #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: __bpf_trace_run kernel/trace/bpf_trace.c:2402 [inline] #3: ffffffff8e333fa0 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1fc/0x540 kernel/trace/bpf_trace.c:2444 stack backtrace: CPU: 0 PID: 5785 Comm: syz-executor.4 Not tainted 6.10.0-rc4-syzkaller-00177-g058722ee350c #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:2403 [inline] bpf_trace_run2+0x2ec/0x540 kernel/trace/bpf_trace.c:2444 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:2403 [inline] bpf_trace_run3+0x33a/0x5a0 kernel/trace/bpf_trace.c:2445 trace_kmem_cache_free include/trace/events/kmem.h:114 [inline] kmem_cache_free+0x2a9/0x350 mm/slub.c:4511 anon_vma_free mm/rmap.c:137 [inline] __put_anon_vma+0x128/0x2d0 mm/rmap.c:2527 put_anon_vma include/linux/rmap.h:116 [inline] unlink_anon_vmas+0x492/0x5f0 mm/rmap.c:444 free_pgtables+0x224/0x730 mm/memory.c:386 exit_mmap+0x447/0xc80 mm/mmap.c:3352 __mmput+0x115/0x3c0 kernel/fork.c:1346 exit_mm+0x220/0x310 kernel/exit.c:565 do_exit+0x9aa/0x27e0 kernel/exit.c:861 do_group_exit+0x207/0x2c0 kernel/exit.c:1023 __do_sys_exit_group kernel/exit.c:1034 [inline] __se_sys_exit_group kernel/exit.c:1032 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1032 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:0x7ffbc8c7d0a9 Code: Unable to access opcode bytes at 0x7ffbc8c7d07f. RSP: 002b:00007ffcf4c82448 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007ffbc8c7d0a9 RDX: 0000000000000064 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000001 R08: 0000000400000000 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007ffcf4c82520 R15: 0000000000000001