================================ WARNING: inconsistent lock state 6.10.0-rc1-syzkaller-gf472e923bf4b #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. dhcpcd/4758 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff8880b9438828 (lock#10){?.+.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b9438828 (lock#10){?.+.}-{2:2}, at: __mmap_lock_do_trace_released+0x83/0x620 mm/mmap_lock.c:243 {HARDIRQ-ON-W} state was registered at: lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754 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/0x3c0 kernel/fork.c:1346 exit_mm+0x220/0x310 kernel/exit.c:565 do_exit+0x9aa/0x27e0 kernel/exit.c:861 do_group_exit+0x207/0x2c0 kernel/exit.c:1023 get_signal+0x16a1/0x1740 kernel/signal.c:2909 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: 74826 hardirqs last enabled at (74825): [] flush_tlb_mm_range+0x3df/0x5c0 arch/x86/mm/tlb.c:1032 hardirqs last disabled at (74826): [] sysvec_irq_work+0xe/0xc0 arch/x86/kernel/irq_work.c:17 softirqs last enabled at (73646): [] __do_softirq kernel/softirq.c:588 [inline] softirqs last enabled at (73646): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last enabled at (73646): [] __irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637 softirqs last disabled at (73631): [] __do_softirq kernel/softirq.c:588 [inline] softirqs last disabled at (73631): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last disabled at (73631): [] __irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(lock#10); lock(lock#10); *** DEADLOCK *** 3 locks held by dhcpcd/4758: #0: ffff88802bc8a658 (&vma->vm_lock->lock){++++}-{3:3}, at: vma_start_read include/linux/mm.h:678 [inline] #0: ffff88802bc8a658 (&vma->vm_lock->lock){++++}-{3:3}, at: lock_vma_under_rcu+0x2f9/0x6e0 mm/memory.c:5844 #1: ffffffff8e333f60 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #1: ffffffff8e333f60 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #1: ffffffff8e333f60 (rcu_read_lock){....}-{1:2}, at: __pte_offset_map+0x82/0x380 mm/pgtable-generic.c:287 #2: ffff8880116ef558 (ptlock_ptr(ptdesc)#2){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline] #2: ffff8880116ef558 (ptlock_ptr(ptdesc)#2){+.+.}-{2:2}, at: __pte_offset_map_lock+0x1ba/0x300 mm/pgtable-generic.c:375 stack backtrace: CPU: 0 PID: 4758 Comm: dhcpcd Not tainted 6.10.0-rc1-syzkaller-gf472e923bf4b #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+0x13a/0x1c0 kernel/locking/lockdep.c:4013 mark_lock_irq+0xbb/0xc20 kernel/locking/lockdep.c:4216 mark_lock+0x223/0x350 kernel/locking/lockdep.c:4678 mark_usage kernel/locking/lockdep.c:4564 [inline] __lock_acquire+0xb8e/0x1fd0 kernel/locking/lockdep.c:5091 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754 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_non_owner include/linux/mmap_lock.h:176 [inline] do_mmap_read_unlock+0x5d/0x60 kernel/bpf/task_iter.c:1049 irq_work_single+0xe2/0x240 kernel/irq_work.c:221 irq_work_run_list kernel/irq_work.c:252 [inline] irq_work_run+0x18b/0x350 kernel/irq_work.c:261 __sysvec_irq_work+0xb8/0x430 arch/x86/kernel/irq_work.c:22 instr_sysvec_irq_work arch/x86/kernel/irq_work.c:17 [inline] sysvec_irq_work+0x9e/0xc0 arch/x86/kernel/irq_work.c:17 asm_sysvec_irq_work+0x1a/0x20 arch/x86/include/asm/idtentry.h:738 RIP: 0010:flush_tlb_mm_range+0x3e7/0x5c0 arch/x86/mm/tlb.c:1036 Code: 1f 76 b9 00 8b 44 24 60 fa a9 00 02 00 00 74 05 e8 3e 22 5b 00 4c 89 f7 e8 d6 f4 ff ff e8 71 20 5b 00 fb 65 ff 0d 11 23 c0 7e 01 00 00 00 e8 cf 27 23 00 65 8b 05 00 72 c1 7e 85 c0 0f 84 a2 RSP: 0000:ffffc900020ef600 EFLAGS: 00000246 RAX: 6b95d793a3a43800 RBX: 1ffff9200041decc RCX: ffffffff8172c78a RDX: dffffc0000000000 RSI: ffffffff8bcaba80 RDI: ffffffff8c1ff240 RBP: ffffc900020ef6d0 R08: ffffffff92fa8587 R09: 1ffffffff25f50b0 R10: dffffc0000000000 R11: fffffbfff25f50b1 R12: 0000000000000000 R13: ffff88802c7ecb40 R14: ffff8880b943d6c0 R15: ffffc900020ef660 flush_tlb_page arch/x86/include/asm/tlbflush.h:254 [inline] ptep_clear_flush+0x11a/0x170 mm/pgtable-generic.c:101 wp_page_copy mm/memory.c:3357 [inline] do_wp_page+0x1c19/0x5310 mm/memory.c:3683 handle_pte_fault+0x119a/0x7130 mm/memory.c:5396 __handle_mm_fault mm/memory.c:5523 [inline] handle_mm_fault+0x10df/0x1ba0 mm/memory.c:5688 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:0x7f12759ed6df Code: 4c 2c 08 01 48 39 cd 74 7e 49 83 4c 24 08 04 eb 76 48 8b 55 70 49 8d 04 1c 48 8d 3d 55 d8 0e 00 4c 3b 72 18 0f 85 51 f8 ff ff <4c> 89 70 18 48 89 50 10 48 89 45 70 48 89 42 18 48 81 fb ff 03 00 RSP: 002b:00007ffce2770db0 EFLAGS: 00010246 RAX: 000055630143ab00 RBX: 0000000000002f40 RCX: 00007f1275b16aa0 RDX: 00007f1275b16b00 RSI: 0000000003fa8400 RDI: 00007f1275adaf2a RBP: 00007f1275b16aa0 R08: 00007f1275b17190 R09: 0000000000000400 R10: 0000000000000302 R11: 0000000000000000 R12: 0000556301437bc0 R13: 0000000000003490 R14: 00007f1275b16b00 R15: 0000000000000550 ---------------- Code disassembly (best guess), 1 bytes skipped: 0: 76 b9 jbe 0xffffffbb 2: 00 8b 44 24 60 fa add %cl,-0x59fdbbc(%rbx) 8: a9 00 02 00 00 test $0x200,%eax d: 74 05 je 0x14 f: e8 3e 22 5b 00 call 0x5b2252 14: 4c 89 f7 mov %r14,%rdi 17: e8 d6 f4 ff ff call 0xfffff4f2 1c: e8 71 20 5b 00 call 0x5b2092 21: fb sti 22: 65 ff 0d 11 23 c0 7e decl %gs:0x7ec02311(%rip) # 0x7ec0233a * 29: bf 01 00 00 00 mov $0x1,%edi <-- trapping instruction 2e: e8 cf 27 23 00 call 0x232802 33: 65 8b 05 00 72 c1 7e mov %gs:0x7ec17200(%rip),%eax # 0x7ec1723a 3a: 85 c0 test %eax,%eax 3c: 0f .byte 0xf 3d: 84 .byte 0x84 3e: a2 .byte 0xa2