================================ WARNING: inconsistent lock state 6.10.0-syzkaller-04484-g13c9b702e6cb #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz.2.1381/12087 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff8880b9538798 (lock#10){?.+.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b9538798 (lock#10){?.+.}-{2:2}, at: __mmap_lock_do_trace_acquire_returned+0x8f/0x630 mm/mmap_lock.c:237 {HARDIRQ-ON-W} state was registered at: lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5753 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_start_locking+0x9c/0x620 mm/mmap_lock.c:230 __mmap_lock_trace_start_locking include/linux/mmap_lock.h:29 [inline] mmap_read_trylock include/linux/mmap_lock.h:162 [inline] vmf_anon_prepare mm/memory.c:3234 [inline] do_anonymous_page mm/memory.c:4451 [inline] do_pte_missing mm/memory.c:3895 [inline] handle_pte_fault+0x6f34/0x7090 mm/memory.c:5381 __handle_mm_fault mm/memory.c:5524 [inline] handle_mm_fault+0x10df/0x1ba0 mm/memory.c:5689 do_user_addr_fault arch/x86/mm/fault.c:1338 [inline] handle_page_fault arch/x86/mm/fault.c:1481 [inline] exc_page_fault+0x459/0x8c0 arch/x86/mm/fault.c:1539 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 irq event stamp: 13046 hardirqs last enabled at (13045): [] irqentry_exit+0x63/0x90 kernel/entry/common.c:357 hardirqs last disabled at (13046): [] sysvec_call_function_single+0xe/0xc0 arch/x86/kernel/smp.c:266 softirqs last enabled at (12842): [] local_bh_disable include/linux/bottom_half.h:20 [inline] softirqs last enabled at (12842): [] fpregs_lock arch/x86/include/asm/fpu/api.h:72 [inline] softirqs last enabled at (12842): [] fpu_clone+0x25b/0xad0 arch/x86/kernel/fpu/core.c:630 softirqs last disabled at (12840): [] local_bh_disable include/linux/bottom_half.h:20 [inline] softirqs last disabled at (12840): [] fpregs_lock arch/x86/include/asm/fpu/api.h:72 [inline] softirqs last disabled at (12840): [] fpu_clone+0x25b/0xad0 arch/x86/kernel/fpu/core.c:630 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.2.1381/12087: #0: ffff88807ce83658 (&vma->vm_lock->lock){++++}-{3:3}, at: vma_start_read include/linux/mm.h:683 [inline] #0: ffff88807ce83658 (&vma->vm_lock->lock){++++}-{3:3}, at: lock_vma_under_rcu+0x2f9/0x6e0 mm/memory.c:5845 #1: ffffffff8e335fe0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:327 [inline] #1: ffffffff8e335fe0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:839 [inline] #1: ffffffff8e335fe0 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2405 [inline] #1: ffffffff8e335fe0 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1fc/0x540 kernel/trace/bpf_trace.c:2447 #2: ffff88805ee6f398 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:163 [inline] #2: ffff88805ee6f398 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x237/0x9d0 kernel/bpf/stackmap.c:141 stack backtrace: CPU: 1 PID: 12087 Comm: syz.2.1381 Not tainted 6.10.0-syzkaller-04484-g13c9b702e6cb #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114 valid_state+0x13a/0x1c0 kernel/locking/lockdep.c:4012 mark_lock_irq+0xbb/0xc20 kernel/locking/lockdep.c:4215 mark_lock+0x223/0x350 kernel/locking/lockdep.c:4677 mark_usage kernel/locking/lockdep.c:4563 [inline] __lock_acquire+0xb8e/0x1fd0 kernel/locking/lockdep.c:5090 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5753 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_acquire_returned+0xa8/0x630 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:164 [inline] stack_map_get_build_id_offset+0x9af/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:1997 [inline] bpf_get_stack_raw_tp+0x1a3/0x240 kernel/trace/bpf_trace.c:1987 bpf_prog_ec3b2eefa702d8d3+0x42/0x46 bpf_dispatcher_nop_func include/linux/bpf.h:1243 [inline] __bpf_prog_run include/linux/filter.h:691 [inline] bpf_prog_run include/linux/filter.h:698 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2406 [inline] bpf_trace_run2+0x2ec/0x540 kernel/trace/bpf_trace.c:2447 trace_tlb_flush+0x118/0x140 include/trace/events/tlb.h:38 flush_tlb_func+0x4e7/0x630 arch/x86/mm/tlb.c:892 csd_do_func kernel/smp.c:134 [inline] __flush_smp_call_function_queue+0x3fc/0x1690 kernel/smp.c:512 __sysvec_call_function_single+0xb8/0x430 arch/x86/kernel/smp.c:271 instr_sysvec_call_function_single arch/x86/kernel/smp.c:266 [inline] sysvec_call_function_single+0x9e/0xc0 arch/x86/kernel/smp.c:266 asm_sysvec_call_function_single+0x1a/0x20 arch/x86/include/asm/idtentry.h:709 RIP: 0010:get_task_policy mm/mempolicy.c:208 [inline] RIP: 0010:get_vma_policy+0x260/0x360 mm/mempolicy.c:1825 Code: 3e 03 00 49 01 2e eb 05 e8 fd 08 9d ff 4c 89 e8 48 83 c4 20 5b 41 5c 41 5d 41 5e 41 5f 5d c3 cc cc cc cc 65 8b 1d e0 36 0a 7e ff ff ff ff 89 de e8 14 0d 9d ff 83 fb ff 74 5d 48 63 eb bf 41 RSP: 0000:ffffc9000474f5e8 EFLAGS: 00000246 RAX: 1ffff1100ed8b29a RBX: 0000000000000000 RCX: 0000000000040000 RDX: ffffc900047a9000 RSI: 000000000003ffff RDI: 0000000000040000 RBP: ffffc9000474f6e8 R08: 0000000000000000 R09: 0000000000000000 R10: ffffc9000474f840 R11: fffff520008e9f0d R12: dffffc0000000000 R13: 0000000000000000 R14: 00007f2a0b108000 R15: ffffc9000474f680 vma_alloc_folio_noprof+0xb5/0x1f0 mm/mempolicy.c:2303 folio_prealloc+0x31/0x170 wp_page_copy mm/memory.c:3285 [inline] do_wp_page+0x11cc/0x52f0 mm/memory.c:3677 handle_pte_fault+0x117e/0x7090 mm/memory.c:5397 __handle_mm_fault mm/memory.c:5524 [inline] handle_mm_fault+0x10df/0x1ba0 mm/memory.c:5689 do_user_addr_fault arch/x86/mm/fault.c:1338 [inline] handle_page_fault arch/x86/mm/fault.c:1481 [inline] exc_page_fault+0x459/0x8c0 arch/x86/mm/fault.c:1539 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 RIP: 0033:0x7f2a0a238b1e Code: f6 31 c0 e8 84 bd 13 00 48 81 c4 90 00 00 00 48 98 5b c3 66 0f 1f 84 00 00 00 00 00 41 54 55 53 48 89 fb 48 81 ec d0 00 00 00 <48> 89 74 24 28 48 89 54 24 30 48 89 4c 24 38 4c 89 44 24 40 4c 89 RSP: 002b:00007f2a0b108f80 EFLAGS: 00010202 RAX: 0000000000000000 RBX: 00007f2a0a3e46a5 RCX: 00007f2a0a3f30e9 RDX: 0000000000023773 RSI: 0000000000000000 RDI: 00007f2a0a3e46a5 RBP: 00007f2a0a3f30e9 R08: 000000000000031e R09: 7fffffffffffffff R10: 00007f2a0b10a0b8 R11: 00007f2a0b10a080 R12: 0000000000000000 R13: 000000000000000b R14: 00007f2a0a505f60 R15: 00007ffddf158898 ---------------- Code disassembly (best guess): 0: 3e 03 00 ds add (%rax),%eax 3: 49 01 2e add %rbp,(%r14) 6: eb 05 jmp 0xd 8: e8 fd 08 9d ff call 0xff9d090a d: 4c 89 e8 mov %r13,%rax 10: 48 83 c4 20 add $0x20,%rsp 14: 5b pop %rbx 15: 41 5c pop %r12 17: 41 5d pop %r13 19: 41 5e pop %r14 1b: 41 5f pop %r15 1d: 5d pop %rbp 1e: c3 ret 1f: cc int3 20: cc int3 21: cc int3 22: cc int3 23: 65 8b 1d e0 36 0a 7e mov %gs:0x7e0a36e0(%rip),%ebx # 0x7e0a370a * 2a: bf ff ff ff ff mov $0xffffffff,%edi <-- trapping instruction 2f: 89 de mov %ebx,%esi 31: e8 14 0d 9d ff call 0xff9d0d4a 36: 83 fb ff cmp $0xffffffff,%ebx 39: 74 5d je 0x98 3b: 48 63 eb movslq %ebx,%rbp 3e: bf .byte 0xbf 3f: 41 rex.B