============================================ WARNING: possible recursive locking detected 6.13.0-rc2-syzkaller-ge4c80f69758e #0 Not tainted -------------------------------------------- syz-executor298/5961 is trying to acquire lock: ffff888027c8ea68 (&trie->lock){-.-.}-{2:2}, at: trie_delete_elem+0x96/0x6e0 kernel/bpf/lpm_trie.c:480 but task is already holding lock: ffff888027c8fa68 (&trie->lock){-.-.}-{2:2}, at: trie_delete_elem+0x96/0x6e0 kernel/bpf/lpm_trie.c:480 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&trie->lock); lock(&trie->lock); *** DEADLOCK *** May be due to missing lock nesting notation 4 locks held by syz-executor298/5961: #0: ffff88807cbb31f0 (&tsk->futex_exit_mutex){+.+.}-{4:4}, at: futex_cleanup_begin kernel/futex/core.c:1070 [inline] #0: ffff88807cbb31f0 (&tsk->futex_exit_mutex){+.+.}-{4:4}, at: futex_exit_release+0x34/0x1f0 kernel/futex/core.c:1122 #1: ffffffff8e937ae0 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline] #1: ffffffff8e937ae0 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #1: ffffffff8e937ae0 (rcu_read_lock){....}-{1:3}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2361 [inline] #1: ffffffff8e937ae0 (rcu_read_lock){....}-{1:3}, at: bpf_trace_run2+0x1fc/0x540 kernel/trace/bpf_trace.c:2403 #2: ffff888027c8fa68 (&trie->lock){-.-.}-{2:2}, at: trie_delete_elem+0x96/0x6e0 kernel/bpf/lpm_trie.c:480 #3: ffffffff8e937ae0 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline] #3: ffffffff8e937ae0 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #3: ffffffff8e937ae0 (rcu_read_lock){....}-{1:3}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2361 [inline] #3: ffffffff8e937ae0 (rcu_read_lock){....}-{1:3}, at: bpf_trace_run2+0x1fc/0x540 kernel/trace/bpf_trace.c:2403 stack backtrace: CPU: 0 UID: 0 PID: 5961 Comm: syz-executor298 Not tainted 6.13.0-rc2-syzkaller-ge4c80f69758e #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/25/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_deadlock_bug+0x483/0x620 kernel/locking/lockdep.c:3037 check_deadlock kernel/locking/lockdep.c:3089 [inline] validate_chain+0x15e2/0x5920 kernel/locking/lockdep.c:3891 __lock_acquire+0x1397/0x2100 kernel/locking/lockdep.c:5226 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5849 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162 trie_delete_elem+0x96/0x6e0 kernel/bpf/lpm_trie.c:480 bpf_prog_5186c38a4019a4cb+0x4b/0x4f bpf_dispatcher_nop_func include/linux/bpf.h:1290 [inline] __bpf_prog_run include/linux/filter.h:701 [inline] bpf_prog_run include/linux/filter.h:708 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2362 [inline] bpf_trace_run2+0x2ec/0x540 kernel/trace/bpf_trace.c:2403 __traceiter_contention_end+0x7b/0xb0 include/trace/events/lock.h:122 trace_contention_end+0x118/0x140 include/trace/events/lock.h:122 __pv_queued_spin_lock_slowpath+0xb7e/0xdb0 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 trie_delete_elem+0x96/0x6e0 kernel/bpf/lpm_trie.c:480 bpf_prog_5186c38a4019a4cb+0x4b/0x4f bpf_dispatcher_nop_func include/linux/bpf.h:1290 [inline] __bpf_prog_run include/linux/filter.h:701 [inline] bpf_prog_run include/linux/filter.h:708 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2362 [inline] bpf_trace_run2+0x2ec/0x540 kernel/trace/bpf_trace.c:2403 __traceiter_contention_end+0x7b/0xb0 include/trace/events/lock.h:122 trace_contention_end+0xf9/0x120 include/trace/events/lock.h:122 __mutex_lock_common kernel/locking/mutex.c:594 [inline] __mutex_lock+0x375/0xee0 kernel/locking/mutex.c:735 futex_cleanup_begin kernel/futex/core.c:1070 [inline] futex_exit_release+0x34/0x1f0 kernel/futex/core.c:1122 exit_mm_release+0x1a/0x30 kernel/fork.c:1660 exit_mm+0xb0/0x310 kernel/exit.c:543 do_exit+0x9b2/0x28e0 kernel/exit.c:925 do_group_exit+0x207/0x2c0 kernel/exit.c:1087 __do_sys_exit_group kernel/exit.c:1098 [inline] __se_sys_exit_group kernel/exit.c:1096 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1096 x64_sys_call+0x26a8/0x26b0 arch/x86/include/generated/asm/syscalls_64.h:232 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:0x7fdb252b4fb9 Code: 90 49 c7 c0 b8 ff ff ff be e7 00 00 00 ba 3c 00 00 00 eb 12 0f 1f 44 00 00 89 d0 0f 05 48 3d 00 f0 ff ff 77 1c f4 89 f0 0f 05 <48> 3d 00 f0 ff ff 76 e7 f7 d8 64 41 89 00 eb df 0f 1f 80 00 00 00 RSP: 002b:00007ffecfdeabb8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fdb252b4fb9 RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000000 RBP: 00007fdb253302b0 R08: ffffffffffffffb8 R09: 00000000000000a0 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fdb253302b0 R13: 0000000000000000 R14: 00007fdb25330d20 R15: 00007fdb25286140