================================ WARNING: inconsistent lock state syzkaller #0 Not tainted -------------------------------- inconsistent {INITIAL USE} -> {IN-NMI} usage. syz.2.17/3921 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff888113a3f238 (&trie->lock){....}-{2:2}, at: trie_delete_elem+0x3f/0x1e0 kernel/bpf/lpm_trie.c:467 {INITIAL USE} state was registered at: lock_acquire+0xe9/0x260 kernel/locking/lockdep.c:5754 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x60/0x90 kernel/locking/spinlock.c:162 trie_delete_elem+0x3f/0x1e0 kernel/bpf/lpm_trie.c:467 ___bpf_prog_run+0xe04/0x24e0 kernel/bpf/core.c:1971 __bpf_prog_run32+0xbb/0xe0 kernel/bpf/core.c:2212 bpf_dispatcher_nop_func include/linux/bpf.h:1224 [inline] __bpf_prog_run include/linux/filter.h:612 [inline] bpf_prog_run include/linux/filter.h:619 [inline] bpf_overflow_handler+0xf8/0x2a0 kernel/events/core.c:10547 __perf_event_overflow+0x106/0x180 kernel/events/core.c:9718 perf_swevent_overflow kernel/events/core.c:9794 [inline] perf_swevent_event+0x107/0x120 kernel/events/core.c:9832 perf_bp_event+0xb5/0xe0 kernel/events/core.c:10739 hw_breakpoint_handler arch/x86/kernel/hw_breakpoint.c:555 [inline] hw_breakpoint_exceptions_notify+0x98/0x1c0 arch/x86/kernel/hw_breakpoint.c:586 notifier_call_chain+0x71/0xf0 kernel/notifier.c:93 atomic_notifier_call_chain+0x9e/0x110 kernel/notifier.c:231 notify_die+0x85/0xa0 kernel/notifier.c:596 notify_debug+0x20/0x30 arch/x86/kernel/traps.c:1042 exc_debug_user arch/x86/kernel/traps.c:1168 [inline] noist_exc_debug+0x67/0x110 arch/x86/kernel/traps.c:1205 asm_exc_debug+0x33/0x40 arch/x86/include/asm/idtentry.h:644 irq event stamp: 1668 hardirqs last enabled at (1667): [] native_save_fl arch/x86/include/asm/irqflags.h:19 [inline] hardirqs last enabled at (1667): [] arch_local_save_flags arch/x86/include/asm/irqflags.h:89 [inline] hardirqs last enabled at (1667): [] arch_irqs_disabled arch/x86/include/asm/irqflags.h:131 [inline] hardirqs last enabled at (1667): [] seqcount_lockdep_reader_access+0xa9/0x100 include/linux/seqlock.h:104 hardirqs last disabled at (1668): [] exc_debug_kernel arch/x86/kernel/traps.c:1063 [inline] hardirqs last disabled at (1668): [] exc_debug+0x7b/0x130 arch/x86/kernel/traps.c:1199 softirqs last enabled at (1662): [] bpf_test_run+0xbb/0x2c0 net/bpf/test_run.c:-1 softirqs last disabled at (1660): [] bpf_test_run+0xbb/0x2c0 net/bpf/test_run.c:-1 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&trie->lock); lock(&trie->lock); *** DEADLOCK *** no locks held by syz.2.17/3921. stack backtrace: CPU: 0 PID: 3921 Comm: syz.2.17 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025 Call Trace: <#DB> dump_stack_lvl+0x83/0xe0 lib/dump_stack.c:106 lock_acquire+0x1d8/0x260 kernel/locking/lockdep.c:5745 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x60/0x90 kernel/locking/spinlock.c:162 trie_delete_elem+0x3f/0x1e0 kernel/bpf/lpm_trie.c:467 ___bpf_prog_run+0xe04/0x24e0 kernel/bpf/core.c:1971 __bpf_prog_run32+0xbb/0xe0 kernel/bpf/core.c:2212 bpf_dispatcher_nop_func include/linux/bpf.h:1224 [inline] __bpf_prog_run include/linux/filter.h:612 [inline] bpf_prog_run include/linux/filter.h:619 [inline] bpf_overflow_handler+0xf8/0x2a0 kernel/events/core.c:10547 __perf_event_overflow+0x106/0x180 kernel/events/core.c:9718 perf_swevent_overflow kernel/events/core.c:9794 [inline] perf_swevent_event+0x107/0x120 kernel/events/core.c:9832 perf_bp_event+0xb5/0xe0 kernel/events/core.c:10739 hw_breakpoint_handler arch/x86/kernel/hw_breakpoint.c:555 [inline] hw_breakpoint_exceptions_notify+0x98/0x1c0 arch/x86/kernel/hw_breakpoint.c:586 notifier_call_chain+0x71/0xf0 kernel/notifier.c:93 atomic_notifier_call_chain+0x9e/0x110 kernel/notifier.c:231 notify_die+0x85/0xa0 kernel/notifier.c:596 notify_debug+0x20/0x30 arch/x86/kernel/traps.c:1042 exc_debug_kernel arch/x86/kernel/traps.c:1099 [inline] exc_debug+0xd9/0x130 arch/x86/kernel/traps.c:1199 asm_exc_debug+0x1e/0x40 arch/x86/include/asm/idtentry.h:644 RIP: 0010:rep_movs_alternative+0x4a/0x90 arch/x86/lib/copy_user_64.S:71 Code: 75 f1 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 48 8b 06 48 89 07 48 83 c6 08 48 83 c7 08 83 e9 08 74 df 83 f9 08 73 e8 eb c9 a4 c3 48 8b 06 48 89 07 48 8d 47 08 48 83 e0 f8 48 29 f8 48 01 RSP: 0018:ffffc90001547cf0 EFLAGS: 00050206 RAX: 0000200000001140 RBX: 0000000000000e40 RCX: 0000000000000e3f RDX: 0000000000000000 RSI: ffff8881096a1041 RDI: 0000200000000301 RBP: 0000000000000e40 R08: 0000000000000000 R09: ffff888117419bc0 R10: ffffc90001547bb8 R11: 0000000000000028 R12: 0000000000000e40 R13: ffff8881096a1040 R14: 0000200000000300 R15: ffff8881096a1040 copy_user_generic arch/x86/include/asm/uaccess_64.h:112 [inline] raw_copy_to_user arch/x86/include/asm/uaccess_64.h:133 [inline] _copy_to_user+0x4a/0x60 lib/usercopy.c:41 copy_to_user include/linux/uaccess.h:191 [inline] bpf_test_finish+0xa9/0x280 net/bpf/test_run.c:462 bpf_prog_test_run_skb+0x4d4/0x530 net/bpf/test_run.c:1070 bpf_prog_test_run+0xdd/0x100 kernel/bpf/syscall.c:4129 __sys_bpf+0x2a5/0x560 kernel/bpf/syscall.c:5491 __do_sys_bpf kernel/bpf/syscall.c:5577 [inline] __se_sys_bpf kernel/bpf/syscall.c:5575 [inline] __x64_sys_bpf+0x17/0x20 kernel/bpf/syscall.c:5575 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f3bff79f749 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:00007f3bff60f038 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 00007f3bff9f5fa0 RCX: 00007f3bff79f749 RDX: 000000000000004c RSI: 0000200000000240 RDI: 000000000000000a RBP: 00007f3bff823f91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f3bff9f6038 R14: 00007f3bff9f5fa0 R15: 00007fff314b0a28 ---------------- Code disassembly (best guess): 0: 75 f1 jne 0xfffffff3 2: c3 ret 3: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) a: 00 00 00 d: 0f 1f 00 nopl (%rax) 10: 48 8b 06 mov (%rsi),%rax 13: 48 89 07 mov %rax,(%rdi) 16: 48 83 c6 08 add $0x8,%rsi 1a: 48 83 c7 08 add $0x8,%rdi 1e: 83 e9 08 sub $0x8,%ecx 21: 74 df je 0x2 23: 83 f9 08 cmp $0x8,%ecx 26: 73 e8 jae 0x10 28: eb c9 jmp 0xfffffff3 * 2a: f3 a4 rep movsb %ds:(%rsi),%es:(%rdi) <-- trapping instruction 2c: c3 ret 2d: 48 8b 06 mov (%rsi),%rax 30: 48 89 07 mov %rax,(%rdi) 33: 48 8d 47 08 lea 0x8(%rdi),%rax 37: 48 83 e0 f8 and $0xfffffffffffffff8,%rax 3b: 48 29 f8 sub %rdi,%rax 3e: 48 rex.W 3f: 01 .byte 0x1