================================ WARNING: inconsistent lock state syzkaller #0 Not tainted -------------------------------- inconsistent {INITIAL USE} -> {IN-NMI} usage. syz.0.641/6324 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff888061326238 (&trie->lock){....}-{2:2}, at: trie_delete_elem+0x8e/0x620 kernel/bpf/lpm_trie.c:466 {INITIAL USE} state was registered at: lock_acquire+0x19e/0x400 kernel/locking/lockdep.c:5625 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xb0/0x100 kernel/locking/spinlock.c:162 trie_delete_elem+0x8e/0x620 kernel/bpf/lpm_trie.c:466 bpf_prog_2c29ac5cdc6b1842+0x3a/0xecc bpf_dispatcher_nop_func include/linux/bpf.h:890 [inline] __bpf_prog_run include/linux/filter.h:621 [inline] bpf_prog_run include/linux/filter.h:635 [inline] bpf_overflow_handler+0x3fd/0x4a0 kernel/events/core.c:10307 __perf_event_overflow+0x35f/0x550 kernel/events/core.c:9525 perf_bp_event+0x276/0x320 kernel/events/core.c:10494 hw_breakpoint_handler arch/x86/kernel/hw_breakpoint.c:555 [inline] hw_breakpoint_exceptions_notify+0x14d/0x470 arch/x86/kernel/hw_breakpoint.c:586 notifier_call_chain kernel/notifier.c:83 [inline] atomic_notifier_call_chain+0x15d/0x280 kernel/notifier.c:198 notify_die+0x141/0x1a0 kernel/notifier.c:529 notify_debug+0x20/0x30 arch/x86/kernel/traps.c:872 exc_debug_user arch/x86/kernel/traps.c:998 [inline] noist_exc_debug+0x73/0x120 arch/x86/kernel/traps.c:1035 asm_exc_debug+0x2f/0x40 arch/x86/include/asm/idtentry.h:642 irq event stamp: 3626 hardirqs last enabled at (3625): [] syscall_enter_from_user_mode+0x21/0x70 kernel/entry/common.c:116 hardirqs last disabled at (3626): [] exc_debug_kernel arch/x86/kernel/traps.c:893 [inline] hardirqs last disabled at (3626): [] exc_debug+0x6e/0x130 arch/x86/kernel/traps.c:1029 softirqs last enabled at (3600): [] sock_setsockopt+0x1ba3/0x2480 net/core/sock.c:1378 softirqs last disabled at (3598): [] spin_lock_bh include/linux/spinlock.h:369 [inline] softirqs last disabled at (3598): [] release_sock+0x2b/0x1b0 net/core/sock.c:3271 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.0.641/6324. stack backtrace: CPU: 1 PID: 6324 Comm: syz.0.641 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 Call Trace: <#DB> dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106 lock_acquire+0x2c3/0x400 kernel/locking/lockdep.c:5616 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xb0/0x100 kernel/locking/spinlock.c:162 trie_delete_elem+0x8e/0x620 kernel/bpf/lpm_trie.c:466 bpf_prog_2c29ac5cdc6b1842+0x3a/0xecc bpf_dispatcher_nop_func include/linux/bpf.h:890 [inline] __bpf_prog_run include/linux/filter.h:621 [inline] bpf_prog_run include/linux/filter.h:635 [inline] bpf_overflow_handler+0x3fd/0x4a0 kernel/events/core.c:10307 __perf_event_overflow+0x35f/0x550 kernel/events/core.c:9525 perf_bp_event+0x276/0x320 kernel/events/core.c:10494 hw_breakpoint_handler arch/x86/kernel/hw_breakpoint.c:555 [inline] hw_breakpoint_exceptions_notify+0x14d/0x470 arch/x86/kernel/hw_breakpoint.c:586 notifier_call_chain kernel/notifier.c:83 [inline] atomic_notifier_call_chain+0x15d/0x280 kernel/notifier.c:198 notify_die+0x141/0x1a0 kernel/notifier.c:529 notify_debug+0x20/0x30 arch/x86/kernel/traps.c:872 exc_debug_kernel arch/x86/kernel/traps.c:929 [inline] exc_debug+0xcf/0x130 arch/x86/kernel/traps.c:1029 asm_exc_debug+0x1a/0x40 arch/x86/include/asm/idtentry.h:642 RIP: 0010:has_zero arch/x86/include/asm/word-at-a-time.h:49 [inline] RIP: 0010:do_strncpy_from_user lib/strncpy_from_user.c:54 [inline] RIP: 0010:strncpy_from_user+0x164/0x350 lib/strncpy_from_user.c:139 Code: 89 e6 e8 9f 9c 70 fd 49 83 fc 07 0f 86 9a 00 00 00 4c 89 74 24 08 48 c7 44 24 10 f8 ff ff ff 45 31 ed 4c 89 3c 24 4f 8b 3c 2f <48> b8 ff fe fe fe fe fe fe fe 49 8d 2c 07 4d 89 fe 49 f7 d6 48 b8 RSP: 0018:ffffc9000330fb90 EFLAGS: 00040246 RAX: ffffffff84087be1 RBX: ffffc9000330fcb0 RCX: ffff888020e28000 RDX: 0000000000000002 RSI: 000000000000007f RDI: 0000000000000007 RBP: 000020000000037f R08: ffff888020e28000 R09: 0000000000000003 R10: 0000000000000002 R11: 0000000000000002 R12: 000000000000007f R13: 0000000000000000 R14: 000000000000007f R15: 00007465004c5047 strncpy_from_bpfptr include/linux/bpfptr.h:84 [inline] bpf_prog_load+0x1fd/0x14e0 kernel/bpf/syscall.c:2239 __sys_bpf+0x532/0x6f0 kernel/bpf/syscall.c:4657 __do_sys_bpf kernel/bpf/syscall.c:4761 [inline] __se_sys_bpf kernel/bpf/syscall.c:4759 [inline] __x64_sys_bpf+0x78/0x90 kernel/bpf/syscall.c:4759 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f2d5f4cf159 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f2d5d727028 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 00007f2d5f756fa0 RCX: 00007f2d5f4cf159 RDX: 0000000000000094 RSI: 00002000000001c0 RDI: 0000000000000005 RBP: 00007f2d5f56606b R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f2d5f757038 R14: 00007f2d5f756fa0 R15: 00007ffddb04f3f8 ---------------- Code disassembly (best guess): 0: 89 e6 mov %esp,%esi 2: e8 9f 9c 70 fd call 0xfd709ca6 7: 49 83 fc 07 cmp $0x7,%r12 b: 0f 86 9a 00 00 00 jbe 0xab 11: 4c 89 74 24 08 mov %r14,0x8(%rsp) 16: 48 c7 44 24 10 f8 ff movq $0xfffffffffffffff8,0x10(%rsp) 1d: ff ff 1f: 45 31 ed xor %r13d,%r13d 22: 4c 89 3c 24 mov %r15,(%rsp) 26: 4f 8b 3c 2f mov (%r15,%r13,1),%r15 * 2a: 48 b8 ff fe fe fe fe movabs $0xfefefefefefefeff,%rax <-- trapping instruction 31: fe fe fe 34: 49 8d 2c 07 lea (%r15,%rax,1),%rbp 38: 4d 89 fe mov %r15,%r14 3b: 49 f7 d6 not %r14 3e: 48 rex.W 3f: b8 .byte 0xb8