====================================================== WARNING: possible circular locking dependency detected 5.15.189-syzkaller #0 Not tainted ------------------------------------------------------ syz.4.32/4421 is trying to acquire lock: ffff88807d498db8 (&trie->lock){....}-{2:2}, at: trie_delete_elem+0x90/0x710 kernel/bpf/lpm_trie.c:467 but task is already holding lock: ffff8880b9135da8 (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+0x141e/0x1c60 mm/page_alloc.c:4189 __alloc_pages+0x1e1/0x470 mm/page_alloc.c:5474 stack_depot_save+0x342/0x440 lib/stackdepot.c:302 save_stack+0x101/0x1e0 mm/page_owner.c:120 __set_page_owner+0x41/0x2d0 mm/page_owner.c:181 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x1b77/0x1c60 mm/page_alloc.c:4192 __alloc_pages+0x1e1/0x470 mm/page_alloc.c:5474 __alloc_pages_node include/linux/gfp.h:570 [inline] alloc_pages_node include/linux/gfp.h:584 [inline] kmalloc_large_node+0x7d/0x190 mm/slub.c:4421 __kmalloc_node+0x232/0x3b0 mm/slub.c:4437 kmalloc_node include/linux/slab.h:627 [inline] bpf_map_kmalloc_node+0xba/0x140 kernel/bpf/syscall.c:430 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:221 map_update_elem+0x626/0x770 kernel/bpf/syscall.c:1188 __sys_bpf+0x3fb/0x670 kernel/bpf/syscall.c:4639 __do_sys_bpf kernel/bpf/syscall.c:4755 [inline] __se_sys_bpf kernel/bpf/syscall.c:4753 [inline] __x64_sys_bpf+0x78/0x90 kernel/bpf/syscall.c:4753 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+0x2c33/0x7c60 kernel/locking/lockdep.c:5012 lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xa4/0xf0 kernel/locking/spinlock.c:162 trie_delete_elem+0x90/0x710 kernel/bpf/lpm_trie.c:467 bpf_prog_a580416b6d2b245d+0x43/0x980 bpf_dispatcher_nop_func include/linux/bpf.h:790 [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+0x153/0x2d0 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+0x6bb/0x7e0 mm/page_alloc.c:3465 release_pages+0x184b/0x1bb0 mm/swap.c:963 __pagevec_release+0x6d/0xe0 mm/swap.c:983 pagevec_release include/linux/pagevec.h:81 [inline] shmem_undo_range+0x593/0x1840 mm/shmem.c:964 shmem_truncate_range mm/shmem.c:1063 [inline] shmem_evict_inode+0x20d/0xa00 mm/shmem.c:1145 evict+0x485/0x870 fs/inode.c:647 __dentry_kill+0x431/0x650 fs/dcache.c:586 dentry_kill+0xb8/0x290 fs/dcache.c:-1 dput+0xd8/0x1a0 fs/dcache.c:893 __fput+0x5ee/0x930 fs/file_table.c:319 task_work_run+0x125/0x1a0 kernel/task_work.c:188 exit_task_work include/linux/task_work.h:33 [inline] do_exit+0x61e/0x20a0 kernel/exit.c:883 do_group_exit+0x12e/0x300 kernel/exit.c:997 get_signal+0x6ca/0x12c0 kernel/signal.c:2900 arch_do_signal_or_restart+0xc1/0x1300 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+0xb1/0x140 kernel/entry/common.c:214 irqentry_exit_to_user_mode+0x5/0x30 kernel/entry/common.c:320 exc_page_fault+0x88/0x100 arch/x86/mm/fault.c:1504 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:606 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.4.32/4421: #0: ffff8880b9135da8 (lock){..-.}-{2:2}, at: local_lock_acquire+0x5/0x120 include/linux/local_lock_internal.h:28 #1: ffffffff8c11c360 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x5/0x30 include/linux/rcupdate.h:311 stack backtrace: CPU: 1 PID: 4421 Comm: syz.4.32 Not tainted 5.15.189-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 Call Trace: dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106 check_noncircular+0x274/0x310 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+0x2c33/0x7c60 kernel/locking/lockdep.c:5012 lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xa4/0xf0 kernel/locking/spinlock.c:162 trie_delete_elem+0x90/0x710 kernel/bpf/lpm_trie.c:467 bpf_prog_a580416b6d2b245d+0x43/0x980 bpf_dispatcher_nop_func include/linux/bpf.h:790 [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+0x153/0x2d0 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+0x6bb/0x7e0 mm/page_alloc.c:3465 release_pages+0x184b/0x1bb0 mm/swap.c:963 __pagevec_release+0x6d/0xe0 mm/swap.c:983 pagevec_release include/linux/pagevec.h:81 [inline] shmem_undo_range+0x593/0x1840 mm/shmem.c:964 shmem_truncate_range mm/shmem.c:1063 [inline] shmem_evict_inode+0x20d/0xa00 mm/shmem.c:1145 evict+0x485/0x870 fs/inode.c:647 __dentry_kill+0x431/0x650 fs/dcache.c:586 dentry_kill+0xb8/0x290 fs/dcache.c:-1 dput+0xd8/0x1a0 fs/dcache.c:893 __fput+0x5ee/0x930 fs/file_table.c:319 task_work_run+0x125/0x1a0 kernel/task_work.c:188 exit_task_work include/linux/task_work.h:33 [inline] do_exit+0x61e/0x20a0 kernel/exit.c:883 do_group_exit+0x12e/0x300 kernel/exit.c:997 get_signal+0x6ca/0x12c0 kernel/signal.c:2900 arch_do_signal_or_restart+0xc1/0x1300 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+0xb1/0x140 kernel/entry/common.c:214 irqentry_exit_to_user_mode+0x5/0x30 kernel/entry/common.c:320 exc_page_fault+0x88/0x100 arch/x86/mm/fault.c:1504 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:606 RIP: 0033:0x7f619cd20927 Code: Unable to access opcode bytes at RIP 0x7f619cd208fd. RSP: 002b:00007f619b0a8120 EFLAGS: 00010202 RAX: 0000000000000000 RBX: 000000000000000b RCX: 00007f619ce5fbe9 RDX: 00007f619b0a8140 RSI: 00007f619b0a8270 RDI: 000000000000000b RBP: 00007f619cee2e19 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000 R13: 00007f619d087038 R14: 00007f619d086fa0 R15: 00007fff4637d398