================================ WARNING: inconsistent lock state 6.10.0-syzkaller-04484-g13c9b702e6cb #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz.2.682/8598 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff8880b9438798 (lock#10){?.+.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b9438798 (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_released+0x9c/0x620 mm/mmap_lock.c:243 __mmap_lock_trace_released include/linux/mmap_lock.h:42 [inline] mmap_read_unlock include/linux/mmap_lock.h:170 [inline] exit_mm+0x2fe/0x310 kernel/exit.c:564 do_exit+0x9b2/0x27f0 kernel/exit.c:864 do_group_exit+0x207/0x2c0 kernel/exit.c:1026 get_signal+0x16a1/0x1740 kernel/signal.c:2917 arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:310 exit_to_user_mode_loop kernel/entry/common.c:111 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0xc9/0x370 kernel/entry/common.c:218 do_syscall_64+0x100/0x230 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f irq event stamp: 8 hardirqs last enabled at (7): [] do_user_addr_fault arch/x86/mm/fault.c:1283 [inline] hardirqs last enabled at (7): [] handle_page_fault arch/x86/mm/fault.c:1481 [inline] hardirqs last enabled at (7): [] exc_page_fault+0x113/0x8c0 arch/x86/mm/fault.c:1539 hardirqs last disabled at (8): [] 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.2.682/8598: #0: ffff88802360c220 (&vma->vm_lock->lock){++++}-{3:3}, at: vma_start_read include/linux/mm.h:683 [inline] #0: ffff88802360c220 (&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: ffff88807c090b58 (ptlock_ptr(ptdesc)#2){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline] #4: ffff88807c090b58 (ptlock_ptr(ptdesc)#2){+.+.}-{2:2}, at: __pte_offset_map_lock+0x1ba/0x300 mm/pgtable-generic.c:375 #5: ffffffff8e335fe0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:327 [inline] #5: ffffffff8e335fe0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:839 [inline] #5: ffffffff8e335fe0 (rcu_read_lock){....}-{1:2}, at: page_ext_get+0x20/0x2a0 mm/page_ext.c:521 #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: ffff8880780d0198 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:163 [inline] #7: ffff8880780d0198 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x237/0x9d0 kernel/bpf/stackmap.c:141 stack backtrace: CPU: 0 PID: 8598 Comm: syz.2.682 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:rcu_dynticks_curr_cpu_in_eqs include/linux/context_tracking.h:122 [inline] RIP: 0010:rcu_is_watching+0x3a/0xb0 kernel/rcu/tree.c:726 Code: 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 4c 89 f7 e8 cc 16 80 00 48 c7 c3 78 7c 03 00 49 03 1e 48 89 RSP: 0000:ffffc90003047508 EFLAGS: 00000246 RAX: 1ffffffff1bba748 RBX: 0000000000000000 RCX: ffff888023835a00 RDX: ffff888023835a00 RSI: ffffffff8c204580 RDI: ffffffff8c204540 RBP: 0000000000000001 R08: ffffffff820854a1 R09: 1ffffffff25f9eb8 R10: dffffc0000000000 R11: fffffbfff25f9eb9 R12: 0000000000000001 R13: 0000000000000001 R14: ffffffff8ddd3a40 R15: dffffc0000000000 rcu_read_lock include/linux/rcupdate.h:840 [inline] page_ext_get+0x5a/0x2a0 mm/page_ext.c:521 page_table_check_set+0x52/0x550 mm/page_table_check.c:114 __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:0x7fe8d870c910 Code: 84 00 00 00 00 00 0f 1f 40 00 48 c7 c0 b0 ff ff ff 64 48 03 04 25 00 00 00 00 c3 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 <48> c7 c0 50 fe ff ff 48 c7 c1 c0 ff ff ff 64 48 8b 00 48 8b 00 48 RSP: 002b:00007fe8d9596118 EFLAGS: 00010246 RAX: fffffffffffffeb8 RBX: 00007fe8d95966c0 RCX: 00007fe8d87a9ee9 RDX: 00007fe8d9596d78 RSI: 0000000000000058 RDI: 00007fe8d95966c0 RBP: 0000000000000000 R08: 00007fe8d95966c0 R09: 00007ffed77abc67 R10: 0000000000000008 R11: 0000000000000202 R12: ffffffffffffffa8 R13: 000000000000000b R14: 00007ffed77abb80 R15: 00007ffed77abc68 ---------------- Code disassembly (best guess): 0: e8 fb bb 0f 0a call 0xa0fbc00 5: 89 c3 mov %eax,%ebx 7: 83 f8 08 cmp $0x8,%eax a: 73 7a jae 0x86 c: 49 bf 00 00 00 00 00 movabs $0xdffffc0000000000,%r15 13: fc ff df 16: 4c 8d 34 dd 40 3a dd lea -0x7222c5c0(,%rbx,8),%r14 1d: 8d 1e: 4c 89 f0 mov %r14,%rax 21: 48 c1 e8 03 shr $0x3,%rax 25: 42 80 3c 38 00 cmpb $0x0,(%rax,%r15,1) * 2a: 74 08 je 0x34 <-- trapping instruction 2c: 4c 89 f7 mov %r14,%rdi 2f: e8 cc 16 80 00 call 0x801700 34: 48 c7 c3 78 7c 03 00 mov $0x37c78,%rbx 3b: 49 03 1e add (%r14),%rbx 3e: 48 rex.W 3f: 89 .byte 0x89