================================
WARNING: inconsistent lock state
syzkaller #0 Not tainted
--------------------------------
inconsistent {INITIAL USE} -> {IN-NMI} usage.
syz.0.17/5931 [HC1[1]:SC0[0]:HE0:SE1] takes:
ffff88807a404a38 (&trie->lock){....}-{2:2}, at: trie_delete_elem+0x96/0x6a0 kernel/bpf/lpm_trie.c:467
{INITIAL USE} state was registered at:
lock_acquire+0x197/0x410 kernel/locking/lockdep.c:5754
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0xa8/0xf0 kernel/locking/spinlock.c:162
trie_delete_elem+0x96/0x6a0 kernel/bpf/lpm_trie.c:467
bpf_prog_2c29ac5cdc6b1842+0x42/0x46
bpf_dispatcher_nop_func include/linux/bpf.h:1224 [inline]
__bpf_prog_run include/linux/filter.h:616 [inline]
bpf_prog_run include/linux/filter.h:623 [inline]
bpf_overflow_handler+0x1f9/0x520 kernel/events/core.c:10547
__perf_event_overflow+0x447/0x630 kernel/events/core.c:9718
perf_swevent_overflow kernel/events/core.c:9794 [inline]
perf_swevent_event+0x4de/0x5c0 kernel/events/core.c:9832
perf_bp_event+0x252/0x300 kernel/events/core.c:10739
hw_breakpoint_handler arch/x86/kernel/hw_breakpoint.c:555 [inline]
hw_breakpoint_exceptions_notify+0x23e/0x670 arch/x86/kernel/hw_breakpoint.c:586
notifier_call_chain+0x197/0x390 kernel/notifier.c:93
atomic_notifier_call_chain+0xda/0x180 kernel/notifier.c:231
notify_die+0x131/0x180 kernel/notifier.c:596
notify_debug+0x2e/0x50 arch/x86/kernel/traps.c:1042
exc_debug_user arch/x86/kernel/traps.c:1168 [inline]
noist_exc_debug+0x77/0x120 arch/x86/kernel/traps.c:1205
asm_exc_debug+0x33/0x40 arch/x86/include/asm/idtentry.h:644
irq event stamp: 2456
hardirqs last enabled at (2455): [<ffffffff8a67d57d>] exc_debug_kernel arch/x86/kernel/traps.c:1117 [inline]
hardirqs last enabled at (2455): [<ffffffff8a67d57d>] exc_debug+0xfd/0x140 arch/x86/kernel/traps.c:1199
hardirqs last disabled at (2456): [<ffffffff8a67d4fb>] exc_debug_kernel arch/x86/kernel/traps.c:1063 [inline]
hardirqs last disabled at (2456): [<ffffffff8a67d4fb>] exc_debug+0x7b/0x140 arch/x86/kernel/traps.c:1199
softirqs last enabled at (2152): [<ffffffff8194c0a2>] bpf_prog_load+0x12f2/0x16d0 kernel/bpf/syscall.c:2779
softirqs last disabled at (2150): [<ffffffff8192ce1d>] spin_lock_bh include/linux/spinlock.h:356 [inline]
softirqs last disabled at (2150): [<ffffffff8192ce1d>] bpf_ksym_add+0x2d/0x340 kernel/bpf/core.c:655
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0
----
lock(&trie->lock);
<Interrupt>
lock(&trie->lock);
*** DEADLOCK ***
no locks held by syz.0.17/5931.
stack backtrace:
CPU: 1 PID: 5931 Comm: syz.0.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+0x16c/0x230 lib/dump_stack.c:106
lock_acquire+0x2b1/0x410 kernel/locking/lockdep.c:5745
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0xa8/0xf0 kernel/locking/spinlock.c:162
trie_delete_elem+0x96/0x6a0 kernel/bpf/lpm_trie.c:467
bpf_prog_2c29ac5cdc6b1842+0x42/0x46
bpf_dispatcher_nop_func include/linux/bpf.h:1224 [inline]
__bpf_prog_run include/linux/filter.h:616 [inline]
bpf_prog_run include/linux/filter.h:623 [inline]
bpf_overflow_handler+0x1f9/0x520 kernel/events/core.c:10547
__perf_event_overflow+0x447/0x630 kernel/events/core.c:9718
perf_swevent_overflow kernel/events/core.c:9794 [inline]
perf_swevent_event+0x4de/0x5c0 kernel/events/core.c:9832
perf_bp_event+0x252/0x300 kernel/events/core.c:10739
hw_breakpoint_handler arch/x86/kernel/hw_breakpoint.c:555 [inline]
hw_breakpoint_exceptions_notify+0x23e/0x670 arch/x86/kernel/hw_breakpoint.c:586
notifier_call_chain+0x197/0x390 kernel/notifier.c:93
atomic_notifier_call_chain+0xda/0x180 kernel/notifier.c:231
notify_die+0x131/0x180 kernel/notifier.c:596
notify_debug+0x2e/0x50 arch/x86/kernel/traps.c:1042
exc_debug_kernel arch/x86/kernel/traps.c:1099 [inline]
exc_debug+0xe6/0x140 arch/x86/kernel/traps.c:1199
asm_exc_debug+0x1e/0x40 arch/x86/include/asm/idtentry.h:644
RIP: 0010:rep_movs_alternative+0x15/0x90 arch/x86/lib/copy_user_64.S:44
Code: 8b 1c 24 4c 8b 64 24 08 48 83 c4 10 c3 cc cc cc cc cc cc cc cc f3 0f 1e fa 48 83 f9 40 73 40 83 f9 08 73 21 85 c9 74 0f 8a 06 <88> 07 48 ff c7 48 ff c6 48 ff c9 75 f1 c3 66 2e 0f 1f 84 00 00 00
RSP: 0018:ffffc90003377cb8 EFLAGS: 00040206
RAX: ffffffff841f8300 RBX: 0000000000000004 RCX: 0000000000000003
RDX: 0000000000000001 RSI: 0000200000000301 RDI: ffff888075bb70f1
RBP: 0000000000000000 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: ffffed100eb76e1e R12: 0000200000000304
R13: ffff88802d4a1900 R14: ffff888075bb70f0 R15: 0000200000000300
</#DB>
<TASK>
copy_user_generic arch/x86/include/asm/uaccess_64.h:112 [inline]
raw_copy_from_user arch/x86/include/asm/uaccess_64.h:127 [inline]
_copy_from_user+0x8b/0xe0 lib/usercopy.c:23
copy_from_user include/linux/uaccess.h:183 [inline]
copy_from_bpfptr_offset include/linux/bpfptr.h:53 [inline]
copy_from_bpfptr include/linux/bpfptr.h:59 [inline]
kvmemdup_bpfptr include/linux/bpfptr.h:74 [inline]
___bpf_copy_key+0xb0/0x100 kernel/bpf/syscall.c:1438
map_update_elem+0x260/0x700 kernel/bpf/syscall.c:1554
__sys_bpf+0x652/0x800 kernel/bpf/syscall.c:5464
__do_sys_bpf kernel/bpf/syscall.c:5580 [inline]
__se_sys_bpf kernel/bpf/syscall.c:5578 [inline]
__x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:5578
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f427ab8f749
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:00007ffd1b9edb28 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 00007f427ade5fa0 RCX: 00007f427ab8f749
RDX: 0000000000000020 RSI: 0000200000004080 RDI: 0000000000000002
RBP: 00007f427ac13f91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f427ade5fa0 R14: 00007f427ade5fa0 R15: 0000000000000003
</TASK>
----------------
Code disassembly (best guess):
0: 8b 1c 24 mov (%rsp),%ebx
3: 4c 8b 64 24 08 mov 0x8(%rsp),%r12
8: 48 83 c4 10 add $0x10,%rsp
c: c3 ret
d: cc int3
e: cc int3
f: cc int3
10: cc int3
11: cc int3
12: cc int3
13: cc int3
14: cc int3
15: f3 0f 1e fa endbr64
19: 48 83 f9 40 cmp $0x40,%rcx
1d: 73 40 jae 0x5f
1f: 83 f9 08 cmp $0x8,%ecx
22: 73 21 jae 0x45
24: 85 c9 test %ecx,%ecx
26: 74 0f je 0x37
28: 8a 06 mov (%rsi),%al
* 2a: 88 07 mov %al,(%rdi) <-- trapping instruction
2c: 48 ff c7 inc %rdi
2f: 48 ff c6 inc %rsi
32: 48 ff c9 dec %rcx
35: 75 f1 jne 0x28
37: c3 ret
38: 66 data16
39: 2e cs
3a: 0f .byte 0xf
3b: 1f (bad)
3c: 84 00 test %al,(%rax)