================================ WARNING: inconsistent lock state 6.1.85-syzkaller #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz-executor.4/3705 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff8880b9835e90 (lock#10){?.+.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b9835e90 (lock#10){?.+.}-{2:2}, at: __mmap_lock_do_trace_acquire_returned+0x84/0x670 mm/mmap_lock.c:237 {HARDIRQ-ON-W} state was registered at: lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_acquire_returned+0x9d/0x670 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:137 [inline] get_mmap_lock_carefully mm/memory.c:5304 [inline] lock_mm_and_find_vma+0x219/0x2e0 mm/memory.c:5366 do_user_addr_fault arch/x86/mm/fault.c:1343 [inline] handle_page_fault arch/x86/mm/fault.c:1462 [inline] exc_page_fault+0x169/0x660 arch/x86/mm/fault.c:1518 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:570 irq event stamp: 34 hardirqs last enabled at (33): [] syscall_enter_from_user_mode+0x2e/0x230 kernel/entry/common.c:117 hardirqs last disabled at (34): [] sysvec_call_function_single+0xa/0xb0 arch/x86/kernel/smp.c:262 softirqs last enabled at (0): [] rcu_lock_acquire include/linux/rcupdate.h:350 [inline] softirqs last enabled at (0): [] rcu_read_lock include/linux/rcupdate.h:791 [inline] softirqs last enabled at (0): [] copy_process+0x9e1/0x4060 kernel/fork.c:2132 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 *** 3 locks held by syz-executor.4/3705: #0: ffffffff8d2029b8 (free_vmap_area_lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline] #0: ffffffff8d2029b8 (free_vmap_area_lock){+.+.}-{2:2}, at: preload_this_cpu_lock mm/vmalloc.c:1580 [inline] #0: ffffffff8d2029b8 (free_vmap_area_lock){+.+.}-{2:2}, at: alloc_vmap_area+0x272/0x1ac0 mm/vmalloc.c:1622 #1: ffffffff8d12ac40 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline] #1: ffffffff8d12ac40 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline] #1: ffffffff8d12ac40 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2272 [inline] #1: ffffffff8d12ac40 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x110/0x410 kernel/trace/bpf_trace.c:2312 #2: ffff88802859bd58 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:136 [inline] #2: ffff88802859bd58 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x232/0x9c0 kernel/bpf/stackmap.c:144 stack backtrace: CPU: 0 PID: 3705 Comm: syz-executor.4 Not tainted 6.1.85-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 valid_state+0x136/0x1c0 kernel/locking/lockdep.c:3969 mark_lock_irq+0xa8/0xba0 kernel/locking/lockdep.c:4172 mark_lock+0x21c/0x340 kernel/locking/lockdep.c:4628 mark_usage kernel/locking/lockdep.c:4520 [inline] __lock_acquire+0xb40/0x1f80 kernel/locking/lockdep.c:5003 lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_acquire_returned+0x9d/0x670 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:137 [inline] stack_map_get_build_id_offset+0x99e/0x9c0 kernel/bpf/stackmap.c:144 __bpf_get_stack+0x495/0x570 kernel/bpf/stackmap.c:452 ____bpf_get_stack_raw_tp kernel/trace/bpf_trace.c:1877 [inline] bpf_get_stack_raw_tp+0x1b2/0x220 kernel/trace/bpf_trace.c:1867 bpf_prog_e6cf5f9c69743609+0x3a/0x3e bpf_dispatcher_nop_func include/linux/bpf.h:989 [inline] __bpf_prog_run include/linux/filter.h:603 [inline] bpf_prog_run include/linux/filter.h:610 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2273 [inline] bpf_trace_run2+0x1fd/0x410 kernel/trace/bpf_trace.c:2312 trace_tlb_flush+0x151/0x1a0 include/trace/events/tlb.h:38 flush_tlb_func+0x4e3/0x620 arch/x86/mm/tlb.c:875 __flush_smp_call_function_queue+0x2d9/0xd00 kernel/smp.c:641 __sysvec_call_function_single+0xbb/0x360 arch/x86/kernel/smp.c:267 sysvec_call_function_single+0x89/0xb0 arch/x86/kernel/smp.c:262 asm_sysvec_call_function_single+0x16/0x20 arch/x86/include/asm/idtentry.h:661 RIP: 0010:bytes_is_nonzero mm/kasan/generic.c:84 [inline] RIP: 0010:memory_is_nonzero mm/kasan/generic.c:102 [inline] RIP: 0010:memory_is_poisoned_n mm/kasan/generic.c:128 [inline] RIP: 0010:memory_is_poisoned mm/kasan/generic.c:159 [inline] RIP: 0010:check_region_inline mm/kasan/generic.c:180 [inline] RIP: 0010:kasan_check_range+0x84/0x290 mm/kasan/generic.c:189 Code: 34 1a 4c 89 f5 4c 29 cd 48 83 fd 10 7f 26 48 85 ed 0f 84 3a 01 00 00 49 f7 d2 49 01 da 41 80 39 00 0f 85 c4 01 00 00 49 ff c1 <49> ff c2 75 ee e9 1d 01 00 00 45 89 cf 41 83 e7 07 0f 84 b5 00 00 RSP: 0018:ffffc9000484f598 EFLAGS: 00000282 RAX: 0000000000000001 RBX: 1ffffffff1ce6dd5 RCX: ffffffff816a8a37 RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffffffff8e736ea8 RBP: 0000000000000001 R08: dffffc0000000000 R09: fffffbfff1ce6dd6 R10: ffffffffffffffff R11: dffffc0000000001 R12: 1ffff92000909ec4 R13: ffffffff81d457e9 R14: fffffbfff1ce6dd6 R15: dffffc0000000000 instrument_atomic_read include/linux/instrumented.h:72 [inline] _test_bit include/asm-generic/bitops/instrumented-non-atomic.h:141 [inline] cpumask_test_cpu include/linux/cpumask.h:444 [inline] cpu_online include/linux/cpumask.h:1030 [inline] trace_lock_release include/trace/events/lock.h:69 [inline] lock_release+0xc7/0xa20 kernel/locking/lockdep.c:5673 __raw_spin_unlock include/linux/spinlock_api_smp.h:141 [inline] _raw_spin_unlock+0x12/0x40 kernel/locking/spinlock.c:186 spin_unlock include/linux/spinlock.h:391 [inline] alloc_vmap_area+0x1799/0x1ac0 mm/vmalloc.c:1625 __get_vm_area_node+0x16c/0x360 mm/vmalloc.c:2505 __vmalloc_node_range+0x394/0x1460 mm/vmalloc.c:3183 __vmalloc_node mm/vmalloc.c:3288 [inline] __vmalloc+0x75/0x80 mm/vmalloc.c:3302 bpf_prog_alloc_no_stats+0x34/0x3f0 kernel/bpf/core.c:92 bpf_prog_alloc+0x1c/0x1b0 kernel/bpf/core.c:130 bpf_prog_load+0x803/0x1bb0 kernel/bpf/syscall.c:2577 __sys_bpf+0x382/0x6c0 kernel/bpf/syscall.c:5005 __do_sys_bpf kernel/bpf/syscall.c:5109 [inline] __se_sys_bpf kernel/bpf/syscall.c:5107 [inline] __x64_sys_bpf+0x78/0x90 kernel/bpf/syscall.c:5107 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f198407de69 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:00007f1984d0f0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 00007f19841abf80 RCX: 00007f198407de69 RDX: 0000000000000090 RSI: 0000000020000280 RDI: 0000000000000005 RBP: 00007f19840ca47a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f19841abf80 R15: 00007ffee84fba18 ---------------- Code disassembly (best guess): 0: 34 1a xor $0x1a,%al 2: 4c 89 f5 mov %r14,%rbp 5: 4c 29 cd sub %r9,%rbp 8: 48 83 fd 10 cmp $0x10,%rbp c: 7f 26 jg 0x34 e: 48 85 ed test %rbp,%rbp 11: 0f 84 3a 01 00 00 je 0x151 17: 49 f7 d2 not %r10 1a: 49 01 da add %rbx,%r10 1d: 41 80 39 00 cmpb $0x0,(%r9) 21: 0f 85 c4 01 00 00 jne 0x1eb 27: 49 ff c1 inc %r9 * 2a: 49 ff c2 inc %r10 <-- trapping instruction 2d: 75 ee jne 0x1d 2f: e9 1d 01 00 00 jmp 0x151 34: 45 89 cf mov %r9d,%r15d 37: 41 83 e7 07 and $0x7,%r15d 3b: 0f .byte 0xf 3c: 84 .byte 0x84 3d: b5 00 mov $0x0,%ch