============================================ WARNING: possible recursive locking detected 6.13.0-rc2-syzkaller-00031-gf92f4749861b #0 Not tainted -------------------------------------------- syz.3.4225/18533 is trying to acquire lock: ffff88807fbff268 (&trie->lock){-.-.}-{2:2}, at: trie_delete_elem+0x96/0x6e0 kernel/bpf/lpm_trie.c:480 but task is already holding lock: ffff888029f2d268 (&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.3.4225/18533: #0: ffff888027f97110 (&u->iolock){+.+.}-{4:4}, at: __unix_dgram_recvmsg+0x246/0x12f0 net/unix/af_unix.c:2432 #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:2350 [inline] #1: ffffffff8e937ae0 (rcu_read_lock){....}-{1:3}, at: bpf_trace_run2+0x1fc/0x540 kernel/trace/bpf_trace.c:2392 #2: ffff888029f2d268 (&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:2350 [inline] #3: ffffffff8e937ae0 (rcu_read_lock){....}-{1:3}, at: bpf_trace_run2+0x1fc/0x540 kernel/trace/bpf_trace.c:2392 stack backtrace: CPU: 1 UID: 0 PID: 18533 Comm: syz.3.4225 Not tainted 6.13.0-rc2-syzkaller-00031-gf92f4749861b #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/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_1c0c44170264bb34+0x46/0x4a 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:2351 [inline] bpf_trace_run2+0x2ec/0x540 kernel/trace/bpf_trace.c:2392 __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_1c0c44170264bb34+0x46/0x4a 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:2351 [inline] bpf_trace_run2+0x2ec/0x540 kernel/trace/bpf_trace.c:2392 __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 __unix_dgram_recvmsg+0x246/0x12f0 net/unix/af_unix.c:2432 sock_recvmsg_nosec+0x18e/0x1d0 net/socket.c:1033 ____sys_recvmsg+0x3cd/0x480 net/socket.c:2801 ___sys_recvmsg net/socket.c:2845 [inline] do_recvmmsg+0x426/0xab0 net/socket.c:2940 __sys_recvmmsg net/socket.c:3014 [inline] __do_sys_recvmmsg net/socket.c:3037 [inline] __se_sys_recvmmsg net/socket.c:3030 [inline] __x64_sys_recvmmsg+0x199/0x250 net/socket.c:3030 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:0x7f0ad477ff19 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f0ad54ad058 EFLAGS: 00000246 ORIG_RAX: 000000000000012b RAX: ffffffffffffffda RBX: 00007f0ad4946080 RCX: 00007f0ad477ff19 RDX: 000000000400034f RSI: 0000000020000480 RDI: 0000000000000008 RBP: 00007f0ad47f3cc8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000002 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f0ad4946080 R15: 00007ffdd8331458