EXT4-fs (loop7): unmounting filesystem. ====================================================== WARNING: possible circular locking dependency detected 6.1.146-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor/5629 is trying to acquire lock: ffff8880553ce238 (&trie->lock){-.-.}-{2:2}, at: trie_delete_elem+0x90/0x690 kernel/bpf/lpm_trie.c:467 but task is already holding lock: ffff8880174409d8 (&n->list_lock){-.-.}-{2:2}, at: __unfreeze_partials+0x71/0x200 mm/slub.c:2550 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&n->list_lock){-.-.}-{2:2}: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xa4/0xf0 kernel/locking/spinlock.c:162 get_partial_node+0x36/0x470 mm/slub.c:2210 get_partial mm/slub.c:2325 [inline] ___slab_alloc+0x968/0x1220 mm/slub.c:3175 __slab_alloc mm/slub.c:3279 [inline] slab_alloc_node mm/slub.c:3364 [inline] __kmem_cache_alloc_node+0x1a0/0x260 mm/slub.c:3437 __do_kmalloc_node mm/slab_common.c:935 [inline] __kmalloc_node+0xa0/0x240 mm/slab_common.c:943 kmalloc_node include/linux/slab.h:589 [inline] bpf_map_kmalloc_node+0xb8/0x1a0 kernel/bpf/syscall.c:452 lpm_trie_node_alloc kernel/bpf/lpm_trie.c:291 [inline] trie_update_elem+0x160/0xe90 kernel/bpf/lpm_trie.c:338 bpf_map_update_value+0x59e/0x670 kernel/bpf/syscall.c:226 generic_map_update_batch+0x569/0x850 kernel/bpf/syscall.c:1702 bpf_map_do_batch+0x466/0x600 kernel/bpf/syscall.c:-1 __sys_bpf+0x65f/0x6d0 kernel/bpf/syscall.c:-1 __do_sys_bpf kernel/bpf/syscall.c:5124 [inline] __se_sys_bpf kernel/bpf/syscall.c:5122 [inline] __x64_sys_bpf+0x78/0x90 kernel/bpf/syscall.c:5122 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 -> #0 (&trie->lock){-.-.}-{2:2}: check_prev_add kernel/locking/lockdep.c:3090 [inline] check_prevs_add kernel/locking/lockdep.c:3209 [inline] validate_chain kernel/locking/lockdep.c:3825 [inline] __lock_acquire+0x2cf8/0x7c50 kernel/locking/lockdep.c:5049 lock_acquire+0x1b4/0x490 kernel/locking/lockdep.c:5662 __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/0x690 kernel/bpf/lpm_trie.c:467 bpf_prog_2c29ac5cdc6b1842+0x3a/0x3e bpf_dispatcher_nop_func include/linux/bpf.h:1001 [inline] __bpf_prog_run include/linux/filter.h:603 [inline] bpf_prog_run include/linux/filter.h:610 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2285 [inline] bpf_trace_run2+0x1cd/0x3b0 kernel/trace/bpf_trace.c:2324 trace_contention_end+0x13f/0x190 include/trace/events/lock.h:122 __pv_queued_spin_lock_slowpath+0x7e8/0x9c0 kernel/locking/qspinlock.c:560 pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:591 [inline] queued_spin_lock_slowpath+0x43/0x50 arch/x86/include/asm/qspinlock.h:51 queued_spin_lock include/asm-generic/qspinlock.h:114 [inline] do_raw_spin_lock+0x217/0x280 kernel/locking/spinlock_debug.c:115 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline] _raw_spin_lock_irqsave+0xb0/0xf0 kernel/locking/spinlock.c:162 __unfreeze_partials+0x71/0x200 mm/slub.c:2550 put_cpu_partial+0x17c/0x250 mm/slub.c:2662 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x76/0xe0 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x144/0x160 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x1e/0x80 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook+0x4b/0x480 mm/slab.h:737 slab_alloc_node mm/slub.c:3398 [inline] slab_alloc mm/slub.c:3406 [inline] __kmem_cache_alloc_lru mm/slub.c:3413 [inline] kmem_cache_alloc+0x123/0x2f0 mm/slub.c:3422 ptlock_alloc+0x1c/0x60 mm/memory.c:6047 ptlock_init include/linux/mm.h:2415 [inline] pgtable_pte_page_ctor include/linux/mm.h:2442 [inline] __pte_alloc_one include/asm-generic/pgalloc.h:66 [inline] pte_alloc_one+0xc5/0x2f0 arch/x86/mm/pgtable.c:33 __pte_alloc+0x21/0x150 mm/memory.c:468 copy_pte_range mm/memory.c:1042 [inline] copy_pmd_range mm/memory.c:1177 [inline] copy_pud_range mm/memory.c:1214 [inline] copy_p4d_range mm/memory.c:1238 [inline] copy_page_range+0x32c2/0x39e0 mm/memory.c:1336 dup_mmap kernel/fork.c:697 [inline] dup_mm kernel/fork.c:1541 [inline] copy_mm+0xde1/0x15c0 kernel/fork.c:1590 copy_process+0x1953/0x4020 kernel/fork.c:2351 kernel_clone+0x225/0x8b0 kernel/fork.c:2757 __do_sys_clone kernel/fork.c:2898 [inline] __se_sys_clone kernel/fork.c:2882 [inline] __x64_sys_clone+0x17c/0x1d0 kernel/fork.c:2882 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&n->list_lock); lock(&trie->lock); lock(&n->list_lock); lock(&trie->lock); *** DEADLOCK *** 6 locks held by syz-executor/5629: #0: ffffffff8cbc5010 (dup_mmap_sem){.+.+}-{0:0}, at: dup_mmap kernel/fork.c:593 [inline] #0: ffffffff8cbc5010 (dup_mmap_sem){.+.+}-{0:0}, at: dup_mm kernel/fork.c:1541 [inline] #0: ffffffff8cbc5010 (dup_mmap_sem){.+.+}-{0:0}, at: copy_mm+0x2a9/0x15c0 kernel/fork.c:1590 #1: ffff88801746a6d8 (&mm->mmap_lock){++++}-{3:3}, at: mmap_write_lock_killable include/linux/mmap_lock.h:87 [inline] #1: ffff88801746a6d8 (&mm->mmap_lock){++++}-{3:3}, at: dup_mmap kernel/fork.c:594 [inline] #1: ffff88801746a6d8 (&mm->mmap_lock){++++}-{3:3}, at: dup_mm kernel/fork.c:1541 [inline] #1: ffff88801746a6d8 (&mm->mmap_lock){++++}-{3:3}, at: copy_mm+0x2c3/0x15c0 kernel/fork.c:1590 #2: ffff888018ef1058 (&mm->mmap_lock/1){+.+.}-{3:3}, at: mmap_write_lock_nested include/linux/mmap_lock.h:78 [inline] #2: ffff888018ef1058 (&mm->mmap_lock/1){+.+.}-{3:3}, at: dup_mmap kernel/fork.c:603 [inline] #2: ffff888018ef1058 (&mm->mmap_lock/1){+.+.}-{3:3}, at: dup_mm kernel/fork.c:1541 [inline] #2: ffff888018ef1058 (&mm->mmap_lock/1){+.+.}-{3:3}, at: copy_mm+0x3ad/0x15c0 kernel/fork.c:1590 #3: ffffffff8cc1b630 (remove_cache_srcu){....}-{0:0}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline] #3: ffffffff8cc1b630 (remove_cache_srcu){....}-{0:0}, at: srcu_read_lock+0x16/0x40 include/linux/srcu.h:165 #4: ffff8880174409d8 (&n->list_lock){-.-.}-{2:2}, at: __unfreeze_partials+0x71/0x200 mm/slub.c:2550 #5: ffffffff8cb2ae20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline] #5: ffffffff8cb2ae20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline] #5: ffffffff8cb2ae20 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2284 [inline] #5: ffffffff8cb2ae20 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0xda/0x3b0 kernel/trace/bpf_trace.c:2324 stack backtrace: CPU: 0 PID: 5629 Comm: syz-executor Not tainted 6.1.146-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: dump_stack_lvl+0x168/0x22e lib/dump_stack.c:106 check_noncircular+0x274/0x310 kernel/locking/lockdep.c:2170 check_prev_add kernel/locking/lockdep.c:3090 [inline] check_prevs_add kernel/locking/lockdep.c:3209 [inline] validate_chain kernel/locking/lockdep.c:3825 [inline] __lock_acquire+0x2cf8/0x7c50 kernel/locking/lockdep.c:5049 lock_acquire+0x1b4/0x490 kernel/locking/lockdep.c:5662 __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/0x690 kernel/bpf/lpm_trie.c:467 bpf_prog_2c29ac5cdc6b1842+0x3a/0x3e bpf_dispatcher_nop_func include/linux/bpf.h:1001 [inline] __bpf_prog_run include/linux/filter.h:603 [inline] bpf_prog_run include/linux/filter.h:610 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2285 [inline] bpf_trace_run2+0x1cd/0x3b0 kernel/trace/bpf_trace.c:2324 trace_contention_end+0x13f/0x190 include/trace/events/lock.h:122 __pv_queued_spin_lock_slowpath+0x7e8/0x9c0 kernel/locking/qspinlock.c:560 pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:591 [inline] queued_spin_lock_slowpath+0x43/0x50 arch/x86/include/asm/qspinlock.h:51 queued_spin_lock include/asm-generic/qspinlock.h:114 [inline] do_raw_spin_lock+0x217/0x280 kernel/locking/spinlock_debug.c:115 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline] _raw_spin_lock_irqsave+0xb0/0xf0 kernel/locking/spinlock.c:162 __unfreeze_partials+0x71/0x200 mm/slub.c:2550 put_cpu_partial+0x17c/0x250 mm/slub.c:2662 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x76/0xe0 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x144/0x160 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x1e/0x80 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook+0x4b/0x480 mm/slab.h:737 slab_alloc_node mm/slub.c:3398 [inline] slab_alloc mm/slub.c:3406 [inline] __kmem_cache_alloc_lru mm/slub.c:3413 [inline] kmem_cache_alloc+0x123/0x2f0 mm/slub.c:3422 ptlock_alloc+0x1c/0x60 mm/memory.c:6047 ptlock_init include/linux/mm.h:2415 [inline] pgtable_pte_page_ctor include/linux/mm.h:2442 [inline] __pte_alloc_one include/asm-generic/pgalloc.h:66 [inline] pte_alloc_one+0xc5/0x2f0 arch/x86/mm/pgtable.c:33 __pte_alloc+0x21/0x150 mm/memory.c:468 copy_pte_range mm/memory.c:1042 [inline] copy_pmd_range mm/memory.c:1177 [inline] copy_pud_range mm/memory.c:1214 [inline] copy_p4d_range mm/memory.c:1238 [inline] copy_page_range+0x32c2/0x39e0 mm/memory.c:1336 dup_mmap kernel/fork.c:697 [inline] dup_mm kernel/fork.c:1541 [inline] copy_mm+0xde1/0x15c0 kernel/fork.c:1590 copy_process+0x1953/0x4020 kernel/fork.c:2351 kernel_clone+0x225/0x8b0 kernel/fork.c:2757 __do_sys_clone kernel/fork.c:2898 [inline] __se_sys_clone kernel/fork.c:2882 [inline] __x64_sys_clone+0x17c/0x1d0 kernel/fork.c:2882 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f9a67385213 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:00007ffea0fb7d58 EFLAGS: 00000246 ORIG_RAX: 0000000000000038 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f9a67385213 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000001200011 RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000001 R10: 000055556db387d0 R11: 0000000000000246 R12: 0000000000000000 R13: 00000000000927c0 R14: 000000000002c247 R15: 00007ffea0fb7ef0