================================ WARNING: inconsistent lock state 6.10.0-syzkaller-04485-gfa5ef655615a #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz.1.1754/10558 [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_write_lock include/linux/mmap_lock.h:105 [inline] exit_mmap+0xb13/0xc80 mm/mmap.c:3349 __mmput+0x115/0x390 kernel/fork.c:1343 exit_mm+0x220/0x310 kernel/exit.c:566 do_exit+0x9b2/0x27f0 kernel/exit.c:864 do_group_exit+0x207/0x2c0 kernel/exit.c:1026 __do_sys_exit_group kernel/exit.c:1037 [inline] __se_sys_exit_group kernel/exit.c:1035 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1035 x64_sys_call+0x2634/0x2640 arch/x86/include/generated/asm/syscalls_64.h:232 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f irq event stamp: 10 hardirqs last enabled at (9): [] do_user_addr_fault arch/x86/mm/fault.c:1283 [inline] hardirqs last enabled at (9): [] handle_page_fault arch/x86/mm/fault.c:1481 [inline] hardirqs last enabled at (9): [] exc_page_fault+0x113/0x8c0 arch/x86/mm/fault.c:1539 hardirqs last disabled at (10): [] sysvec_call_function_single+0xe/0xc0 arch/x86/kernel/smp.c:266 softirqs last enabled at (0): [] rcu_lock_acquire include/linux/rcupdate.h:327 [inline] softirqs last enabled at (0): [] rcu_read_lock include/linux/rcupdate.h:839 [inline] softirqs last enabled at (0): [] copy_process+0xa03/0x3dc0 kernel/fork.c:2242 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 *** 8 locks held by syz.1.1754/10558: #0: ffff8880222b0d18 (&vma->vm_lock->lock){++++}-{3:3}, at: vma_start_read include/linux/mm.h:683 [inline] #0: ffff8880222b0d18 (&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: do_fault_around mm/memory.c:4878 [inline] #1: ffffffff8e335fe0 (rcu_read_lock){....}-{1:2}, at: do_read_fault mm/memory.c:4912 [inline] #1: ffffffff8e335fe0 (rcu_read_lock){....}-{1:2}, at: do_fault mm/memory.c:5051 [inline] #1: ffffffff8e335fe0 (rcu_read_lock){....}-{1:2}, at: do_pte_missing mm/memory.c:3897 [inline] #1: ffffffff8e335fe0 (rcu_read_lock){....}-{1:2}, at: handle_pte_fault+0x222c/0x7090 mm/memory.c:5381 #2: ffffffff8e335fe0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:327 [inline] #2: ffffffff8e335fe0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:839 [inline] #2: ffffffff8e335fe0 (rcu_read_lock){....}-{1:2}, at: filemap_map_pages+0x24f/0x1e70 mm/filemap.c:3615 #3: ffffffff8e335fe0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:327 [inline] #3: ffffffff8e335fe0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:839 [inline] #3: ffffffff8e335fe0 (rcu_read_lock){....}-{1:2}, at: __pte_offset_map+0x82/0x380 mm/pgtable-generic.c:287 #4: ffff88801190f678 (ptlock_ptr(ptdesc)#2){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline] #4: ffff88801190f678 (ptlock_ptr(ptdesc)#2){+.+.}-{2:2}, at: __pte_offset_map_lock+0x1ba/0x300 mm/pgtable-generic.c:375 #5: ffffffff8e335f60 (rcu_read_lock_sched){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:327 [inline] #5: ffffffff8e335f60 (rcu_read_lock_sched){....}-{1:2}, at: rcu_read_lock_sched include/linux/rcupdate.h:931 [inline] #5: ffffffff8e335f60 (rcu_read_lock_sched){....}-{1:2}, at: pfn_valid+0xf6/0x450 include/linux/mmzone.h:2022 #6: ffffffff8e335fe0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:327 [inline] #6: ffffffff8e335fe0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:839 [inline] #6: ffffffff8e335fe0 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2405 [inline] #6: ffffffff8e335fe0 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1fc/0x540 kernel/trace/bpf_trace.c:2447 #7: ffff8880615ce098 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:163 [inline] #7: ffff8880615ce098 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x237/0x9d0 kernel/bpf/stackmap.c:141 stack backtrace: CPU: 1 PID: 10558 Comm: syz.1.1754 Not tainted 6.10.0-syzkaller-04485-gfa5ef655615a #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:rcu_dynticks_curr_cpu_in_eqs include/linux/context_tracking.h:122 [inline] RIP: 0010:rcu_is_watching+0x26/0xb0 kernel/rcu/tree.c:726 Code: 90 90 90 90 f3 0f 1e fa 41 57 41 56 53 65 ff 05 28 5b 87 7e e8 fb bb 0f 0a 89 c3 83 f8 08 73 7a 49 bf 00 00 00 00 00 fc ff df <4c> 8d 34 dd 40 3a dd 8d 4c 89 f0 48 c1 e8 03 42 80 3c 38 00 74 08 RSP: 0000:ffffc90003f17500 EFLAGS: 00000297 RAX: 0000000000000001 RBX: 0000000000000001 RCX: ffff888022930000 RDX: ffff888022930000 RSI: ffffffff8c204580 RDI: ffffffff8c204540 RBP: 0000000000000001 R08: ffffffff820879e2 R09: 1ffffffff25f9eb8 R10: dffffc0000000000 R11: fffffbfff25f9eb9 R12: dffffc0000000000 R13: 00000000000113ca R14: ffffffff82087766 R15: dffffc0000000000 rcu_read_unlock_sched include/linux/rcupdate.h:950 [inline] pfn_valid+0x37b/0x450 include/linux/mmzone.h:2032 page_table_check_set+0x25/0x550 mm/page_table_check.c:110 __page_table_check_ptes_set+0x30f/0x410 mm/page_table_check.c:225 page_table_check_ptes_set include/linux/page_table_check.h:74 [inline] set_ptes include/linux/pgtable.h:267 [inline] set_pte_range+0x71f/0x750 mm/memory.c:4707 filemap_map_order0_folio mm/filemap.c:3594 [inline] filemap_map_pages+0x117b/0x1e70 mm/filemap.c:3644 do_fault_around mm/memory.c:4879 [inline] do_read_fault mm/memory.c:4912 [inline] do_fault mm/memory.c:5051 [inline] do_pte_missing mm/memory.c:3897 [inline] handle_pte_fault+0x3b9b/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 RIP: 0033:0x7f1db230c910 Code: Unable to access opcode bytes at 0x7f1db230c8e6. RSP: 002b:00007f1db30a3118 EFLAGS: 00010246 RAX: fffffffffffffeb8 RBX: 00007f1db30a36c0 RCX: 00007f1db23a9ee9 RDX: 00007f1db30a3d78 RSI: 0000000000000058 RDI: 00007f1db30a36c0 RBP: 0000000000000000 R08: 00007f1db30a36c0 R09: 00007ffd4d5cf6a7 R10: 0000000000000008 R11: 0000000000000202 R12: ffffffffffffffa8 R13: 000000000000000b R14: 00007ffd4d5cf5c0 R15: 00007ffd4d5cf6a8 ---------------- Code disassembly (best guess): 0: 90 nop 1: 90 nop 2: 90 nop 3: 90 nop 4: f3 0f 1e fa endbr64 8: 41 57 push %r15 a: 41 56 push %r14 c: 53 push %rbx d: 65 ff 05 28 5b 87 7e incl %gs:0x7e875b28(%rip) # 0x7e875b3c 14: e8 fb bb 0f 0a call 0xa0fbc14 19: 89 c3 mov %eax,%ebx 1b: 83 f8 08 cmp $0x8,%eax 1e: 73 7a jae 0x9a 20: 49 bf 00 00 00 00 00 movabs $0xdffffc0000000000,%r15 27: fc ff df * 2a: 4c 8d 34 dd 40 3a dd lea -0x7222c5c0(,%rbx,8),%r14 <-- trapping instruction 31: 8d 32: 4c 89 f0 mov %r14,%rax 35: 48 c1 e8 03 shr $0x3,%rax 39: 42 80 3c 38 00 cmpb $0x0,(%rax,%r15,1) 3e: 74 08 je 0x48