====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.0.1563/8416 is trying to acquire lock: ffff8880796a1238 (&trie->lock){..-.}-{2:2}, at: trie_delete_elem+0x90/0x710 kernel/bpf/lpm_trie.c:467 but task is already holding lock: ffff8880b9135df8 (lock){-.-.}-{2:2}, at: local_lock_acquire+0x5/0x120 include/linux/local_lock_internal.h:28 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (lock){-.-.}-{2:2}: local_lock_acquire+0x2b/0x120 include/linux/local_lock_internal.h:29 rmqueue_pcplist mm/page_alloc.c:3699 [inline] rmqueue mm/page_alloc.c:3742 [inline] get_page_from_freelist+0x1436/0x1ca0 mm/page_alloc.c:4189 __alloc_pages+0x1ee/0x480 mm/page_alloc.c:5487 alloc_slab_page mm/slub.c:1780 [inline] allocate_slab mm/slub.c:1917 [inline] new_slab+0xc0/0x4b0 mm/slub.c:1980 ___slab_alloc+0x80a/0xdd0 mm/slub.c:3013 __slab_alloc mm/slub.c:3100 [inline] slab_alloc_node mm/slub.c:3191 [inline] __kmalloc_node+0x200/0x3b0 mm/slub.c:4456 kmalloc_node include/linux/slab.h:630 [inline] bpf_map_kmalloc_node+0xba/0x140 kernel/bpf/syscall.c:432 lpm_trie_node_alloc kernel/bpf/lpm_trie.c:290 [inline] trie_update_elem+0x1cc/0xc50 kernel/bpf/lpm_trie.c:332 bpf_map_update_value+0x57d/0x650 kernel/bpf/syscall.c:223 map_update_elem+0x626/0x770 kernel/bpf/syscall.c:1194 __sys_bpf+0x46b/0x6f0 kernel/bpf/syscall.c:4645 __do_sys_bpf kernel/bpf/syscall.c:4761 [inline] __se_sys_bpf kernel/bpf/syscall.c:4759 [inline] __x64_sys_bpf+0x78/0x90 kernel/bpf/syscall.c:4759 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 -> #0 (&trie->lock){..-.}-{2:2}: check_prev_add kernel/locking/lockdep.c:3053 [inline] check_prevs_add kernel/locking/lockdep.c:3172 [inline] validate_chain kernel/locking/lockdep.c:3788 [inline] __lock_acquire+0x2c42/0x7d10 kernel/locking/lockdep.c:5012 lock_acquire+0x19e/0x400 kernel/locking/lockdep.c:5623 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xb0/0x100 kernel/locking/spinlock.c:162 trie_delete_elem+0x90/0x710 kernel/bpf/lpm_trie.c:467 bpf_prog_1db1603a7cfa36fb+0x3d/0x2a4 bpf_dispatcher_nop_func include/linux/bpf.h:888 [inline] __bpf_prog_run include/linux/filter.h:628 [inline] bpf_prog_run include/linux/filter.h:635 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:1878 [inline] bpf_trace_run1+0x159/0x2e0 kernel/trace/bpf_trace.c:1914 __bpf_trace_mm_page_free_batched+0x41/0x60 include/trace/events/kmem.h:182 trace_mm_page_free_batched include/trace/events/kmem.h:182 [inline] free_unref_page_list+0x6e9/0x820 mm/page_alloc.c:3465 release_pages+0x186c/0x1be0 mm/swap.c:963 tlb_batch_pages_flush mm/mmu_gather.c:49 [inline] tlb_flush_mmu_free mm/mmu_gather.c:240 [inline] tlb_flush_mmu+0xce/0x180 mm/mmu_gather.c:247 zap_pte_range mm/memory.c:1456 [inline] zap_pmd_range mm/memory.c:1505 [inline] zap_pud_range mm/memory.c:1534 [inline] zap_p4d_range mm/memory.c:1555 [inline] unmap_page_range+0x207a/0x2500 mm/memory.c:1576 unmap_vmas+0x131/0x250 mm/memory.c:1653 exit_mmap+0x3b9/0x640 mm/mmap.c:3216 __mmput+0x115/0x3b0 kernel/fork.c:1127 exit_mm+0x588/0x6e0 kernel/exit.c:550 do_exit+0x5a9/0x20c0 kernel/exit.c:870 do_group_exit+0x12e/0x300 kernel/exit.c:997 get_signal+0x6ca/0x12c0 kernel/signal.c:2900 arch_do_signal_or_restart+0xe7/0x12c0 arch/x86/kernel/signal.c:867 handle_signal_work kernel/entry/common.c:154 [inline] exit_to_user_mode_loop+0x9e/0x130 kernel/entry/common.c:178 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:214 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:307 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x66/0xd0 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(lock); lock(&trie->lock); lock(lock); lock(&trie->lock); *** DEADLOCK *** 2 locks held by syz.0.1563/8416: #0: ffff8880b9135df8 (lock){-.-.}-{2:2}, at: local_lock_acquire+0x5/0x120 include/linux/local_lock_internal.h:28 #1: ffffffff8c31c720 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x5/0x30 include/linux/rcupdate.h:312 stack backtrace: CPU: 1 PID: 8416 Comm: syz.0.1563 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025 Call Trace: dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106 check_noncircular+0x296/0x330 kernel/locking/lockdep.c:2133 check_prev_add kernel/locking/lockdep.c:3053 [inline] check_prevs_add kernel/locking/lockdep.c:3172 [inline] validate_chain kernel/locking/lockdep.c:3788 [inline] __lock_acquire+0x2c42/0x7d10 kernel/locking/lockdep.c:5012 lock_acquire+0x19e/0x400 kernel/locking/lockdep.c:5623 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xb0/0x100 kernel/locking/spinlock.c:162 trie_delete_elem+0x90/0x710 kernel/bpf/lpm_trie.c:467 bpf_prog_1db1603a7cfa36fb+0x3d/0x2a4 bpf_dispatcher_nop_func include/linux/bpf.h:888 [inline] __bpf_prog_run include/linux/filter.h:628 [inline] bpf_prog_run include/linux/filter.h:635 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:1878 [inline] bpf_trace_run1+0x159/0x2e0 kernel/trace/bpf_trace.c:1914 __bpf_trace_mm_page_free_batched+0x41/0x60 include/trace/events/kmem.h:182 trace_mm_page_free_batched include/trace/events/kmem.h:182 [inline] free_unref_page_list+0x6e9/0x820 mm/page_alloc.c:3465 release_pages+0x186c/0x1be0 mm/swap.c:963 tlb_batch_pages_flush mm/mmu_gather.c:49 [inline] tlb_flush_mmu_free mm/mmu_gather.c:240 [inline] tlb_flush_mmu+0xce/0x180 mm/mmu_gather.c:247 zap_pte_range mm/memory.c:1456 [inline] zap_pmd_range mm/memory.c:1505 [inline] zap_pud_range mm/memory.c:1534 [inline] zap_p4d_range mm/memory.c:1555 [inline] unmap_page_range+0x207a/0x2500 mm/memory.c:1576 unmap_vmas+0x131/0x250 mm/memory.c:1653 exit_mmap+0x3b9/0x640 mm/mmap.c:3216 __mmput+0x115/0x3b0 kernel/fork.c:1127 exit_mm+0x588/0x6e0 kernel/exit.c:550 do_exit+0x5a9/0x20c0 kernel/exit.c:870 do_group_exit+0x12e/0x300 kernel/exit.c:997 get_signal+0x6ca/0x12c0 kernel/signal.c:2900 arch_do_signal_or_restart+0xe7/0x12c0 arch/x86/kernel/signal.c:867 handle_signal_work kernel/entry/common.c:154 [inline] exit_to_user_mode_loop+0x9e/0x130 kernel/entry/common.c:178 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:214 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:307 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f972c7cbcb9 Code: Unable to access opcode bytes at RIP 0x7f972c7cbc8f. RSP: 002b:00007f972aa270e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 00007f972ca46fa8 RCX: 00007f972c7cbcb9 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f972ca46fa8 RBP: 00007f972ca46fa0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f972ca47038 R14: 00007ffe4f7641f0 R15: 00007ffe4f7642d8