================================ WARNING: inconsistent lock state 6.9.0-rc7-syzkaller #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz-executor.1/5684 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff8880b95387a8 (lock#10){?.+.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b95387a8 (lock#10){?.+.}-{2:2}, at: __mmap_lock_do_trace_acquire_returned+0x8f/0x620 mm/mmap_lock.c:237 {HARDIRQ-ON-W} state was registered at: lock_acquire+0x1ed/0x540 kernel/locking/lockdep.c:5754 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_acquire_returned+0xa8/0x620 mm/mmap_lock.c:237 __mmap_lock_trace_acquire_returned include/linux/mmap_lock.h:36 [inline] mmap_write_lock_killable include/linux/mmap_lock.h:125 [inline] vm_mmap_pgoff+0x3e2/0x420 mm/util.c:571 ksys_mmap_pgoff+0x504/0x6e0 mm/mmap.c:1431 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x88/0x170 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x76/0x7e irq event stamp: 96 hardirqs last enabled at (95): [] seqcount_lockdep_reader_access+0x13b/0x1e0 include/linux/seqlock.h:74 hardirqs last disabled at (96): [] sysvec_call_function_single+0xe/0xc0 arch/x86/kernel/smp.c:266 softirqs last enabled at (0): [] rcu_lock_acquire include/linux/rcupdate.h:329 [inline] softirqs last enabled at (0): [] rcu_read_lock include/linux/rcupdate.h:781 [inline] softirqs last enabled at (0): [] copy_process+0xa03/0x3df0 kernel/fork.c:2259 softirqs last disabled at (0): [<0000000000000000>] 0x0 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(lock#10); lock(lock#10); *** DEADLOCK *** 2 locks held by syz-executor.1/5684: #0: ffffffff8dd302a0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #0: ffffffff8dd302a0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #0: ffffffff8dd302a0 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2380 [inline] #0: ffffffff8dd302a0 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x114/0x420 kernel/trace/bpf_trace.c:2420 #1: ffff88806d1ecba0 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:165 [inline] #1: ffff88806d1ecba0 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x237/0x9d0 kernel/bpf/stackmap.c:141 stack backtrace: CPU: 1 PID: 5684 Comm: syz-executor.1 Not tainted 6.9.0-rc7-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114 valid_state+0x139/0x1c0 kernel/locking/lockdep.c:4013 mark_lock_irq+0xac/0xbb0 kernel/locking/lockdep.c:4216 mark_lock+0x21f/0x350 kernel/locking/lockdep.c:4678 mark_usage kernel/locking/lockdep.c:4564 [inline] __lock_acquire+0xce1/0x7fa0 kernel/locking/lockdep.c:5091 lock_acquire+0x1ed/0x540 kernel/locking/lockdep.c:5754 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_acquire_returned+0xa8/0x620 mm/mmap_lock.c:237 __mmap_lock_trace_acquire_returned include/linux/mmap_lock.h:36 [inline] mmap_read_trylock include/linux/mmap_lock.h:166 [inline] stack_map_get_build_id_offset+0x9b2/0x9d0 kernel/bpf/stackmap.c:141 __bpf_get_stack+0x4ad/0x5a0 kernel/bpf/stackmap.c:449 ____bpf_get_stack_raw_tp kernel/trace/bpf_trace.c:1985 [inline] bpf_get_stack_raw_tp+0x1a3/0x240 kernel/trace/bpf_trace.c:1975 bpf_prog_ec3b2eefa702d8d3+0x42/0x46 bpf_dispatcher_nop_func include/linux/bpf.h:1234 [inline] __bpf_prog_run include/linux/filter.h:657 [inline] bpf_prog_run include/linux/filter.h:664 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2381 [inline] bpf_trace_run2+0x204/0x420 kernel/trace/bpf_trace.c:2420 __traceiter_tlb_flush+0x77/0xd0 include/trace/events/tlb.h:38 trace_tlb_flush+0x112/0x130 include/trace/events/tlb.h:38 flush_tlb_func+0x4e7/0x620 arch/x86/mm/tlb.c:892 csd_do_func kernel/smp.c:133 [inline] __flush_smp_call_function_queue+0x3d6/0x13b0 kernel/smp.c:511 __sysvec_call_function_single+0xb8/0x420 arch/x86/kernel/smp.c:271 instr_sysvec_call_function_single arch/x86/kernel/smp.c:266 [inline] sysvec_call_function_single+0x9c/0xc0 arch/x86/kernel/smp.c:266 asm_sysvec_call_function_single+0x1a/0x20 arch/x86/include/asm/idtentry.h:709 RIP: 0010:check_kcov_mode kernel/kcov.c:173 [inline] RIP: 0010:write_comp_data kernel/kcov.c:236 [inline] RIP: 0010:__sanitizer_cov_trace_switch+0xa4/0x120 kernel/kcov.c:341 Code: 8b 00 00 00 4c 8b 4c 24 20 65 4c 8b 1c 25 80 d3 03 00 31 d2 eb 08 48 ff c2 49 39 d2 74 71 4c 8b 74 d6 10 65 8b 05 84 be 6f 7e 00 01 ff 00 74 11 a9 00 01 00 00 74 de 41 83 bb 14 16 00 00 00 RSP: 0018:ffffc90005ca6600 EFLAGS: 00000202 RAX: 0000000080000001 RBX: 0000000000000001 RCX: 0000000000000000 RDX: 0000000000000002 RSI: ffffffff8dba04a0 RDI: 0000000000000001 RBP: ffffffff8fc8e09c R08: 0000000000000005 R09: ffffffff814158af R10: 0000000000000003 R11: ffff88807b011e00 R12: ffffc90005ca6d20 R13: dffffc0000000000 R14: 0000000000000004 R15: 1ffff92000b94ce0 unwind_next_frame+0x196f/0x2a00 arch/x86/kernel/unwind_orc.c:641 arch_stack_walk+0x151/0x1b0 arch/x86/kernel/stacktrace.c:25 stack_trace_save+0x118/0x1d0 kernel/stacktrace.c:122 kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 unpoison_slab_object mm/kasan/common.c:312 [inline] __kasan_slab_alloc+0x4b/0x60 mm/kasan/common.c:338 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slub.c:3804 [inline] slab_alloc_node mm/slub.c:3851 [inline] kmem_cache_alloc_node+0x18f/0x350 mm/slub.c:3894 alloc_vmap_area+0x259/0x22b0 mm/vmalloc.c:1967 __get_vm_area_node+0x16e/0x3c0 mm/vmalloc.c:3093 __vmalloc_node_range+0x3df/0x1490 mm/vmalloc.c:3778 __vmalloc_node mm/vmalloc.c:3883 [inline] vmalloc+0x79/0x90 mm/vmalloc.c:3916 bpf_prog_calc_tag+0xcf/0x900 kernel/bpf/core.c:301 resolve_pseudo_ldimm64+0xdf/0x1690 kernel/bpf/verifier.c:18211 bpf_check+0x6195/0x19a10 kernel/bpf/verifier.c:21292 bpf_prog_load+0x1667/0x20f0 kernel/bpf/syscall.c:2895 __sys_bpf+0x4ee/0x810 kernel/bpf/syscall.c:5660 __do_sys_bpf kernel/bpf/syscall.c:5767 [inline] __se_sys_bpf kernel/bpf/syscall.c:5765 [inline] __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:5765 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x88/0x170 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7fe893a7dd69 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fe8947510c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 00007fe893babf80 RCX: 00007fe893a7dd69 RDX: 0000000000000080 RSI: 0000000020000180 RDI: 0000000000000005 RBP: 00007fe893aca49e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007fe893babf80 R15: 00007fff4fa263e8 ---------------- Code disassembly (best guess): 0: 8b 00 mov (%rax),%eax 2: 00 00 add %al,(%rax) 4: 4c 8b 4c 24 20 mov 0x20(%rsp),%r9 9: 65 4c 8b 1c 25 80 d3 mov %gs:0x3d380,%r11 10: 03 00 12: 31 d2 xor %edx,%edx 14: eb 08 jmp 0x1e 16: 48 ff c2 inc %rdx 19: 49 39 d2 cmp %rdx,%r10 1c: 74 71 je 0x8f 1e: 4c 8b 74 d6 10 mov 0x10(%rsi,%rdx,8),%r14 23: 65 8b 05 84 be 6f 7e mov %gs:0x7e6fbe84(%rip),%eax # 0x7e6fbeae * 2a: a9 00 01 ff 00 test $0xff0100,%eax <-- trapping instruction 2f: 74 11 je 0x42 31: a9 00 01 00 00 test $0x100,%eax 36: 74 de je 0x16 38: 41 83 bb 14 16 00 00 cmpl $0x0,0x1614(%r11) 3f: 00