================================ WARNING: inconsistent lock state syzkaller #0 Not tainted -------------------------------- inconsistent {INITIAL USE} -> {IN-NMI} usage. syz.0.17/6603 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff888019ad0140 (&htab->lockdep_key){....}-{2:2}, at: htab_lock_bucket+0x181/0x300 kernel/bpf/hashtab.c:166 {INITIAL USE} state was registered at: lock_acquire+0x197/0x410 kernel/locking/lockdep.c:5754 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:154 htab_lock_bucket+0x181/0x300 kernel/bpf/hashtab.c:166 htab_map_delete_elem+0x1a4/0x630 kernel/bpf/hashtab.c:1443 bpf_prog_653fb3e4a9309dc2+0x4a/0x4e 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+0x1f9/0x4f0 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: 2020 hardirqs last enabled at (2019): [] exc_debug_kernel arch/x86/kernel/traps.c:1117 [inline] hardirqs last enabled at (2019): [] exc_debug+0xfd/0x140 arch/x86/kernel/traps.c:1199 hardirqs last disabled at (2020): [] exc_debug_kernel arch/x86/kernel/traps.c:1063 [inline] hardirqs last disabled at (2020): [] exc_debug+0x7b/0x140 arch/x86/kernel/traps.c:1199 softirqs last enabled at (1712): [] __do_softirq kernel/softirq.c:612 [inline] softirqs last enabled at (1712): [] invoke_softirq kernel/softirq.c:452 [inline] softirqs last enabled at (1712): [] __irq_exit_rcu+0xc7/0x190 kernel/softirq.c:661 softirqs last disabled at (775): [] __do_softirq kernel/softirq.c:612 [inline] softirqs last disabled at (775): [] invoke_softirq kernel/softirq.c:452 [inline] softirqs last disabled at (775): [] __irq_exit_rcu+0xc7/0x190 kernel/softirq.c:661 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&htab->lockdep_key); lock(&htab->lockdep_key); *** DEADLOCK *** no locks held by syz.0.17/6603. stack backtrace: CPU: 1 PID: 6603 Comm: syz.0.17 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/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 include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:154 htab_lock_bucket+0x181/0x300 kernel/bpf/hashtab.c:166 htab_map_delete_elem+0x1a4/0x630 kernel/bpf/hashtab.c:1443 bpf_prog_653fb3e4a9309dc2+0x4a/0x4e 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+0x1f9/0x4f0 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+0x17/0x90 arch/x86/lib/copy_user_64.S:45 Code: 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 00 00 RSP: 0018:ffffc90003486df0 EFLAGS: 00040206 RAX: ffffffff841f4e52 RBX: 0000000000000004 RCX: 0000000000000003 RDX: 0000000000000000 RSI: ffff88802094468d RDI: 0000200000000303 RBP: 0000000000000004 R08: ffff88802094468f R09: 1ffff110041288d1 R10: dffffc0000000000 R11: ffffed10041288d2 R12: 0000200000000306 R13: 0000000000000002 R14: 0000200000000302 R15: ffff88802094468c 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+0x85/0xa0 lib/usercopy.c:41 copy_to_user include/linux/uaccess.h:191 [inline] bpf_verifier_vlog+0x2fa/0x870 kernel/bpf/log.c:124 verbose+0x10b/0x180 kernel/bpf/verifier.c:370 print_verifier_state+0x1c0/0x2fc0 kernel/bpf/verifier.c:1373 do_check+0x4fc9/0xdbe0 kernel/bpf/verifier.c:17133 do_check_common+0xadb/0x13e0 kernel/bpf/verifier.c:19706 do_check_main kernel/bpf/verifier.c:19769 [inline] bpf_check+0x649f/0xe970 kernel/bpf/verifier.c:20437 bpf_prog_load+0x11cb/0x16d0 kernel/bpf/syscall.c:2750 __sys_bpf+0x55a/0x800 kernel/bpf/syscall.c:5473 __do_sys_bpf kernel/bpf/syscall.c:5577 [inline] __se_sys_bpf kernel/bpf/syscall.c:5575 [inline] __x64_sys_bpf+0x7c/0x90 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:0x7fa310f8f749 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:00007fa311d99038 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 00007fa3111e5fa0 RCX: 00007fa310f8f749 RDX: 0000000000000048 RSI: 0000200000000240 RDI: 0000000000000005 RBP: 00007fa311013f91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fa3111e6038 R14: 00007fa3111e5fa0 R15: 00007ffc0811d098 ---------------- Code disassembly (best guess): 0: 24 4c and $0x4c,%al 2: 8b 64 24 08 mov 0x8(%rsp),%esp 6: 48 83 c4 10 add $0x10,%rsp a: c3 ret b: cc int3 c: cc int3 d: cc int3 e: cc int3 f: cc int3 10: cc int3 11: cc int3 12: cc int3 13: f3 0f 1e fa endbr64 17: 48 83 f9 40 cmp $0x40,%rcx 1b: 73 40 jae 0x5d 1d: 83 f9 08 cmp $0x8,%ecx 20: 73 21 jae 0x43 22: 85 c9 test %ecx,%ecx 24: 74 0f je 0x35 26: 8a 06 mov (%rsi),%al 28: 88 07 mov %al,(%rdi) * 2a: 48 ff c7 inc %rdi <-- trapping instruction 2d: 48 ff c6 inc %rsi 30: 48 ff c9 dec %rcx 33: 75 f1 jne 0x26 35: c3 ret 36: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 3d: 00 00 00