================================ WARNING: inconsistent lock state 6.10.0-syzkaller-04558-g6189fa6faa09 #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz-executor/10923 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff8880b9338798 (lock#10){?.+.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b9338798 (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: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] do_user_addr_fault arch/x86/mm/fault.c:1417 [inline] handle_page_fault arch/x86/mm/fault.c:1481 [inline] exc_page_fault+0x7a2/0x8c0 arch/x86/mm/fault.c:1539 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 rep_movs_alternative+0x4a/0x70 arch/x86/lib/copy_user_64.S:65 copy_user_generic arch/x86/include/asm/uaccess_64.h:110 [inline] raw_copy_from_user arch/x86/include/asm/uaccess_64.h:125 [inline] copy_from_user_iter lib/iov_iter.c:55 [inline] iterate_ubuf include/linux/iov_iter.h:29 [inline] iterate_and_advance2 include/linux/iov_iter.h:245 [inline] iterate_and_advance include/linux/iov_iter.h:271 [inline] __copy_from_iter lib/iov_iter.c:249 [inline] _copy_from_iter+0x26b/0x1960 lib/iov_iter.c:260 copy_from_iter include/linux/uio.h:204 [inline] copy_from_iter_full include/linux/uio.h:221 [inline] memcpy_from_msg include/linux/skbuff.h:4064 [inline] netlink_sendmsg+0x73d/0xcb0 net/netlink/af_netlink.c:1886 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0x221/0x270 net/socket.c:745 sock_write_iter+0x2dd/0x400 net/socket.c:1160 new_sync_write fs/read_write.c:497 [inline] vfs_write+0xa72/0xc90 fs/read_write.c:590 ksys_write+0x1a0/0x2c0 fs/read_write.c:643 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: 256 hardirqs last enabled at (255): [] flush_tlb_mm_range+0x3df/0x5c0 arch/x86/mm/tlb.c:1032 hardirqs last disabled at (256): [] sysvec_irq_work+0xe/0xc0 arch/x86/kernel/irq_work.c:17 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 *** 3 locks held by syz-executor/10923: #0: ffff88807bfb03d0 (&vma->vm_lock->lock){++++}-{3:3}, at: vma_start_read include/linux/mm.h:683 [inline] #0: ffff88807bfb03d0 (&vma->vm_lock->lock){++++}-{3:3}, at: lock_vma_under_rcu+0x2f9/0x6e0 mm/memory.c:5845 #1: ffffffff8e735fe0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:327 [inline] #1: ffffffff8e735fe0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:839 [inline] #1: ffffffff8e735fe0 (rcu_read_lock){....}-{1:2}, at: __pte_offset_map+0x82/0x380 mm/pgtable-generic.c:287 #2: ffff88806cb38858 (ptlock_ptr(ptdesc)#2){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline] #2: ffff88806cb38858 (ptlock_ptr(ptdesc)#2){+.+.}-{2:2}, at: __pte_offset_map_lock+0x1ba/0x300 mm/pgtable-generic.c:375 stack backtrace: CPU: 1 PID: 10923 Comm: syz-executor Not tainted 6.10.0-syzkaller-04558-g6189fa6faa09 #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_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:1046 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: 4f 31 ba 00 8b 44 24 60 fa a9 00 02 00 00 74 05 e8 ce 2b 5b 00 4c 89 f7 e8 d6 f4 ff ff e8 01 2a 5b 00 fb 65 ff 0d 31 ee bf 7e 01 00 00 00 e8 af 2d 23 00 65 8b 05 a0 3d c1 7e 85 c0 0f 84 a2 RSP: 0000:ffffc90012f6f600 EFLAGS: 00000246 RAX: 909934a5ece62c00 RBX: 1ffff920025edecc RCX: ffffffff817302da RDX: dffffc0000000000 RSI: ffffffff8beac920 RDI: ffffffff8c4047a0 RBP: ffffc90012f6f6d0 R08: ffffffff934f05c7 R09: 1ffffffff269e0b8 R10: dffffc0000000000 R11: fffffbfff269e0b9 R12: 0000000000000001 R13: ffff88807ce841c0 R14: ffff8880b933d740 R15: ffffc90012f6f660 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:3351 [inline] do_wp_page+0x1bf0/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:0x7fd26c63e38d Code: 41 54 55 53 48 83 ec 60 e8 c0 99 13 00 85 c0 0f 88 83 03 00 00 48 8d 3d f1 59 1a 00 89 c3 be 02 00 00 00 31 c0 e8 f3 64 13 00 <89> 05 21 fe 28 00 89 c7 83 f8 ff 0f 84 51 03 00 00 be ca 00 00 00 RSP: 002b:00007fff644437e0 EFLAGS: 00010202 RAX: 0000000000000005 RBX: 0000000000000003 RCX: 00007fd26c7748d1 RDX: 0000000000000000 RSI: 00007fd26c7e3d70 RDI: 00000000ffffff9c RBP: 00007fd26c906a18 R08: 0000000000000000 R09: 00007fd26d43d6c0 R10: 0000000000000000 R11: 0000000000000202 R12: 000000000000000c R13: 0000000000000003 R14: 0000000000000009 R15: 0000000000000009 ---------------- Code disassembly (best guess), 3 bytes skipped: 0: 00 8b 44 24 60 fa add %cl,-0x59fdbbc(%rbx) 6: a9 00 02 00 00 test $0x200,%eax b: 74 05 je 0x12 d: e8 ce 2b 5b 00 call 0x5b2be0 12: 4c 89 f7 mov %r14,%rdi 15: e8 d6 f4 ff ff call 0xfffff4f0 1a: e8 01 2a 5b 00 call 0x5b2a20 1f: fb sti 20: 65 ff 0d 31 ee bf 7e decl %gs:0x7ebfee31(%rip) # 0x7ebfee58 * 27: bf 01 00 00 00 mov $0x1,%edi <-- trapping instruction 2c: e8 af 2d 23 00 call 0x232de0 31: 65 8b 05 a0 3d c1 7e mov %gs:0x7ec13da0(%rip),%eax # 0x7ec13dd8 38: 85 c0 test %eax,%eax 3a: 0f .byte 0xf 3b: 84 .byte 0x84 3c: a2 .byte 0xa2