====================================================== WARNING: possible circular locking dependency detected 6.10.0-rc2-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.5/7385 is trying to acquire lock: ffff8880154406d8 (&n->list_lock){-.-.}-{2:2}, at: get_partial_node.part.0+0x20/0x350 mm/slub.c:2675 but task is already holding lock: ffff88805c1f99f8 (&trie->lock){-.-.}-{2:2}, at: trie_update_elem+0xc8/0xe00 kernel/bpf/lpm_trie.c:333 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&trie->lock){-.-.}-{2:2}: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x3a/0x60 kernel/locking/spinlock.c:162 trie_delete_elem+0xb0/0x820 kernel/bpf/lpm_trie.c:462 0xffffffffa000086a 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+0x234/0x590 kernel/trace/bpf_trace.c:2444 __bpf_trace_contention_end+0xca/0x110 include/trace/events/lock.h:122 trace_contention_end.constprop.0+0xea/0x170 include/trace/events/lock.h:122 __pv_queued_spin_lock_slowpath+0x28e/0xcc0 kernel/locking/qspinlock.c:557 pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:584 [inline] queued_spin_lock_slowpath arch/x86/include/asm/qspinlock.h:51 [inline] queued_spin_lock include/asm-generic/qspinlock.h:114 [inline] do_raw_spin_lock+0x210/0x2c0 kernel/locking/spinlock_debug.c:116 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline] _raw_spin_lock_irqsave+0x42/0x60 kernel/locking/spinlock.c:162 get_partial_node.part.0+0x20/0x350 mm/slub.c:2675 get_partial_node mm/slub.c:2672 [inline] get_partial mm/slub.c:2789 [inline] ___slab_alloc+0x65b/0x1870 mm/slub.c:3646 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3756 __slab_alloc_node mm/slub.c:3809 [inline] slab_alloc_node mm/slub.c:3988 [inline] kmem_cache_alloc_noprof+0x2a7/0x2f0 mm/slub.c:4007 fill_pool+0x26b/0x5d0 lib/debugobjects.c:168 debug_objects_fill_pool lib/debugobjects.c:615 [inline] debug_object_assert_init+0x147/0x370 lib/debugobjects.c:893 debug_timer_assert_init kernel/time/timer.c:846 [inline] debug_assert_init kernel/time/timer.c:891 [inline] __mod_timer+0xae/0xdc0 kernel/time/timer.c:1072 ieee80211_sta_merge_ibss net/mac80211/ibss.c:1270 [inline] ieee80211_ibss_work+0x481/0x14c0 net/mac80211/ibss.c:1670 ieee80211_iface_work+0xcfd/0xf00 net/mac80211/iface.c:1681 cfg80211_wiphy_work+0x258/0x330 net/wireless/core.c:437 process_one_work+0x9fe/0x1b60 kernel/workqueue.c:3231 process_scheduled_works kernel/workqueue.c:3312 [inline] worker_thread+0x6c8/0xf70 kernel/workqueue.c:3393 kthread+0x2c4/0x3a0 kernel/kthread.c:389 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 -> #0 (&n->list_lock){-.-.}-{2:2}: check_prev_add kernel/locking/lockdep.c:3134 [inline] check_prevs_add kernel/locking/lockdep.c:3253 [inline] validate_chain kernel/locking/lockdep.c:3869 [inline] __lock_acquire+0x2478/0x3b30 kernel/locking/lockdep.c:5137 lock_acquire kernel/locking/lockdep.c:5754 [inline] lock_acquire+0x1b1/0x560 kernel/locking/lockdep.c:5719 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x3a/0x60 kernel/locking/spinlock.c:162 get_partial_node.part.0+0x20/0x350 mm/slub.c:2675 get_partial_node mm/slub.c:3715 [inline] get_partial mm/slub.c:2789 [inline] ___slab_alloc+0x1728/0x1870 mm/slub.c:3646 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3756 __slab_alloc_node mm/slub.c:3809 [inline] slab_alloc_node mm/slub.c:3988 [inline] __do_kmalloc_node mm/slub.c:4120 [inline] __kmalloc_node_noprof+0x35c/0x440 mm/slub.c:4128 kmalloc_array_node_noprof include/linux/slab.h:759 [inline] alloc_slab_obj_exts+0x41/0xa0 mm/slub.c:1941 account_slab mm/slub.c:2390 [inline] allocate_slab mm/slub.c:2445 [inline] new_slab+0x20f/0x260 mm/slub.c:2480 ___slab_alloc+0xdac/0x1870 mm/slub.c:3666 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3756 __slab_alloc_node mm/slub.c:3809 [inline] slab_alloc_node mm/slub.c:3988 [inline] __do_kmalloc_node mm/slub.c:4120 [inline] __kmalloc_node_noprof+0x35c/0x440 mm/slub.c:4128 kmalloc_node_noprof include/linux/slab.h:681 [inline] bpf_map_kmalloc_node+0x98/0x4a0 kernel/bpf/syscall.c:422 lpm_trie_node_alloc kernel/bpf/lpm_trie.c:299 [inline] trie_update_elem+0x1ef/0xe00 kernel/bpf/lpm_trie.c:342 bpf_map_update_value+0x2c4/0x6c0 kernel/bpf/syscall.c:203 generic_map_update_batch+0x454/0x5f0 kernel/bpf/syscall.c:1889 bpf_map_do_batch+0x64d/0x720 kernel/bpf/syscall.c:5196 __sys_bpf+0x19a9/0x49a0 kernel/bpf/syscall.c:5751 __do_sys_bpf kernel/bpf/syscall.c:5794 [inline] __se_sys_bpf kernel/bpf/syscall.c:5792 [inline] __x64_sys_bpf+0x78/0xc0 kernel/bpf/syscall.c:5792 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&trie->lock); lock(&n->list_lock); lock(&trie->lock); lock(&n->list_lock); *** DEADLOCK *** 2 locks held by syz-executor.5/7385: #0: ffffffff8dbb5ba0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #0: ffffffff8dbb5ba0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #0: ffffffff8dbb5ba0 (rcu_read_lock){....}-{1:2}, at: bpf_map_update_value+0x24b/0x6c0 kernel/bpf/syscall.c:202 #1: ffff88805c1f99f8 (&trie->lock){-.-.}-{2:2}, at: trie_update_elem+0xc8/0xe00 kernel/bpf/lpm_trie.c:333 stack backtrace: CPU: 0 PID: 7385 Comm: syz-executor.5 Not tainted 6.10.0-rc2-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114 check_noncircular+0x31a/0x400 kernel/locking/lockdep.c:2187 check_prev_add kernel/locking/lockdep.c:3134 [inline] check_prevs_add kernel/locking/lockdep.c:3253 [inline] validate_chain kernel/locking/lockdep.c:3869 [inline] __lock_acquire+0x2478/0x3b30 kernel/locking/lockdep.c:5137 lock_acquire kernel/locking/lockdep.c:5754 [inline] lock_acquire+0x1b1/0x560 kernel/locking/lockdep.c:5719 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x3a/0x60 kernel/locking/spinlock.c:162 get_partial_node.part.0+0x20/0x350 mm/slub.c:2675 get_partial_node mm/slub.c:3715 [inline] get_partial mm/slub.c:2789 [inline] ___slab_alloc+0x1728/0x1870 mm/slub.c:3646 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3756 __slab_alloc_node mm/slub.c:3809 [inline] slab_alloc_node mm/slub.c:3988 [inline] __do_kmalloc_node mm/slub.c:4120 [inline] __kmalloc_node_noprof+0x35c/0x440 mm/slub.c:4128 kmalloc_array_node_noprof include/linux/slab.h:759 [inline] alloc_slab_obj_exts+0x41/0xa0 mm/slub.c:1941 account_slab mm/slub.c:2390 [inline] allocate_slab mm/slub.c:2445 [inline] new_slab+0x20f/0x260 mm/slub.c:2480 ___slab_alloc+0xdac/0x1870 mm/slub.c:3666 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3756 __slab_alloc_node mm/slub.c:3809 [inline] slab_alloc_node mm/slub.c:3988 [inline] __do_kmalloc_node mm/slub.c:4120 [inline] __kmalloc_node_noprof+0x35c/0x440 mm/slub.c:4128 kmalloc_node_noprof include/linux/slab.h:681 [inline] bpf_map_kmalloc_node+0x98/0x4a0 kernel/bpf/syscall.c:422 lpm_trie_node_alloc kernel/bpf/lpm_trie.c:299 [inline] trie_update_elem+0x1ef/0xe00 kernel/bpf/lpm_trie.c:342 bpf_map_update_value+0x2c4/0x6c0 kernel/bpf/syscall.c:203 generic_map_update_batch+0x454/0x5f0 kernel/bpf/syscall.c:1889 bpf_map_do_batch+0x64d/0x720 kernel/bpf/syscall.c:5196 __sys_bpf+0x19a9/0x49a0 kernel/bpf/syscall.c:5751 __do_sys_bpf kernel/bpf/syscall.c:5794 [inline] __se_sys_bpf kernel/bpf/syscall.c:5792 [inline] __x64_sys_bpf+0x78/0xc0 kernel/bpf/syscall.c:5792 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f2807a7cee9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f280881f0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 00007f2807bb3fa0 RCX: 00007f2807a7cee9 RDX: 0000000000000038 RSI: 0000000020000680 RDI: 000000000000001a RBP: 00007f2807ac947f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f2807bb3fa0 R15: 00007ffede8c3448