================================ WARNING: inconsistent lock state 6.10.0-rc5-syzkaller-00018-g55027e689933 #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz.3.772/7633 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff8880b9238a80 (lock#12){?.+.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b9238a80 (lock#12){?.+.}-{2:2}, at: __mmap_lock_do_trace_acquire_returned+0x7f/0x790 mm/mmap_lock.c:237 {HARDIRQ-ON-W} state was registered at: lock_acquire kernel/locking/lockdep.c:5754 [inline] lock_acquire+0x1b1/0x560 kernel/locking/lockdep.c:5719 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_acquire_returned+0x97/0x790 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] get_mmap_lock_carefully mm/memory.c:5715 [inline] lock_mm_and_find_vma+0xeb/0x6a0 mm/memory.c:5775 do_user_addr_fault+0x29c/0xe50 arch/x86/mm/fault.c:1361 handle_page_fault arch/x86/mm/fault.c:1481 [inline] exc_page_fault+0x5c/0xc0 arch/x86/mm/fault.c:1539 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 rep_movs_alternative+0x33/0x70 arch/x86/lib/copy_user_64.S:57 copy_user_generic arch/x86/include/asm/uaccess_64.h:110 [inline] raw_copy_to_user arch/x86/include/asm/uaccess_64.h:131 [inline] _copy_to_user lib/usercopy.c:46 [inline] _copy_to_user+0xac/0xc0 lib/usercopy.c:39 copy_to_user include/linux/uaccess.h:191 [inline] msr_read+0x155/0x250 arch/x86/kernel/msr.c:69 vfs_read+0x1d4/0xbd0 fs/read_write.c:474 ksys_read+0x12f/0x260 fs/read_write.c:619 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f irq event stamp: 26 hardirqs last enabled at (25): [] do_user_addr_fault+0x192/0xe50 arch/x86/mm/fault.c:1283 hardirqs last disabled at (26): [] sysvec_call_function_single+0xe/0xb0 arch/x86/kernel/smp.c:266 softirqs last enabled at (0): [] copy_process+0x222a/0x8f10 kernel/fork.c:2336 softirqs last disabled at (0): [<0000000000000000>] 0x0 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(lock#12); lock(lock#12); *** DEADLOCK *** 5 locks held by syz.3.772/7633: #0: ffff88806699b4a8 (&vma->vm_lock->lock){++++}-{3:3}, at: vma_start_read include/linux/mm.h:678 [inline] #0: ffff88806699b4a8 (&vma->vm_lock->lock){++++}-{3:3}, at: lock_vma_under_rcu+0x1e2/0x8f0 mm/memory.c:5844 #1: ffffffff8dbb1920 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #1: ffffffff8dbb1920 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #1: ffffffff8dbb1920 (rcu_read_lock){....}-{1:2}, at: __pte_offset_map+0x42/0x540 mm/pgtable-generic.c:287 #2: ffff88807ca73078 (ptlock_ptr(ptdesc)#2){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline] #2: ffff88807ca73078 (ptlock_ptr(ptdesc)#2){+.+.}-{2:2}, at: __pte_offset_map_lock+0xf1/0x300 mm/pgtable-generic.c:375 #3: ffffffff8dbb1920 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #3: ffffffff8dbb1920 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #3: ffffffff8dbb1920 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2402 [inline] #3: ffffffff8dbb1920 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1c2/0x590 kernel/trace/bpf_trace.c:2444 #4: ffff88807cb04418 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:163 [inline] #4: ffff88807cb04418 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x1e8/0x7c0 kernel/bpf/stackmap.c:141 stack backtrace: CPU: 0 PID: 7633 Comm: syz.3.772 Not tainted 6.10.0-rc5-syzkaller-00018-g55027e689933 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114 print_usage_bug kernel/locking/lockdep.c:3971 [inline] valid_state kernel/locking/lockdep.c:4013 [inline] mark_lock_irq kernel/locking/lockdep.c:4216 [inline] mark_lock+0x923/0xc60 kernel/locking/lockdep.c:4678 mark_usage kernel/locking/lockdep.c:4564 [inline] __lock_acquire+0x1359/0x3b30 kernel/locking/lockdep.c:5091 lock_acquire kernel/locking/lockdep.c:5754 [inline] lock_acquire+0x1b1/0x560 kernel/locking/lockdep.c:5719 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_acquire_returned+0x97/0x790 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+0x5d9/0x7c0 kernel/bpf/stackmap.c:141 __bpf_get_stack+0x6bf/0x700 kernel/bpf/stackmap.c:449 ____bpf_get_stack_raw_tp kernel/trace/bpf_trace.c:1994 [inline] bpf_get_stack_raw_tp+0x124/0x160 kernel/trace/bpf_trace.c:1984 ___bpf_prog_run+0x3e51/0xabd0 kernel/bpf/core.c:2012 __bpf_prog_run32+0xc1/0x100 kernel/bpf/core.c:2253 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:2403 [inline] bpf_trace_run2+0x231/0x590 kernel/trace/bpf_trace.c:2444 __bpf_trace_tlb_flush+0xd2/0x110 include/trace/events/tlb.h:38 trace_tlb_flush+0xf3/0x170 include/trace/events/tlb.h:38 csd_do_func kernel/smp.c:133 [inline] __flush_smp_call_function_queue+0x27a/0x8c0 kernel/smp.c:511 __sysvec_call_function_single+0x8c/0x410 arch/x86/kernel/smp.c:271 instr_sysvec_call_function_single arch/x86/kernel/smp.c:266 [inline] sysvec_call_function_single+0x90/0xb0 arch/x86/kernel/smp.c:266 asm_sysvec_call_function_single+0x1a/0x20 arch/x86/include/asm/idtentry.h:709 RIP: 0010:pv_wait_head_or_lock kernel/locking/qspinlock_paravirt.h:430 [inline] RIP: 0010:__pv_queued_spin_lock_slowpath+0x436/0xcc0 kernel/locking/qspinlock.c:508 Code: 00 01 00 00 66 89 8c 24 90 00 00 00 41 0f b6 07 44 38 e0 7f 08 84 c0 0f 85 26 07 00 00 0f b6 03 84 c0 0f 84 b0 00 00 00 f3 90 <41> 83 ed 01 75 cf 48 b8 00 00 00 00 00 fc ff df 48 8b 74 24 20 48 RSP: 0000:ffffc90003107a88 EFLAGS: 00000202 RAX: 0000000000000001 RBX: ffff88807ca73060 RCX: 0000000000000100 RDX: 0000000000000001 RSI: 0000000000000004 RDI: ffff88807ca73062 RBP: dffffc0000000000 R08: 0000000000000001 R09: ffffed100f94e60c R10: ffff88807ca73063 R11: 0000000000000002 R12: 0000000000000000 R13: 0000000000007f45 R14: ffff8880b923fa40 R15: ffffed100f94e60c pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:584 [inline] queued_spin_lock_slowpath arch/x86/include/asm/qspinlock.h:51 [inline] queued_spin_lock include/asm-generic/qspinlock.h:114 [inline] do_raw_spin_lock+0x210/0x2c0 kernel/locking/spinlock_debug.c:116 spin_lock include/linux/spinlock.h:351 [inline] __pte_offset_map_lock+0xf1/0x300 mm/pgtable-generic.c:375 pte_offset_map_lock include/linux/mm.h:3020 [inline] do_anonymous_page mm/memory.c:4431 [inline] do_pte_missing mm/memory.c:3895 [inline] handle_pte_fault mm/memory.c:5380 [inline] __handle_mm_fault+0x26c8/0x5410 mm/memory.c:5523 handle_mm_fault+0x476/0xa00 mm/memory.c:5688 do_user_addr_fault+0x426/0xe50 arch/x86/mm/fault.c:1338 handle_page_fault arch/x86/mm/fault.c:1481 [inline] exc_page_fault+0x5c/0xc0 arch/x86/mm/fault.c:1539 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 RIP: 0033:0x7f602e246897 Code: b9 40 42 0f 00 ba 81 00 00 00 4c 89 e6 41 c7 04 24 01 00 00 00 bf ca 00 00 00 31 c0 e8 42 f2 12 00 eb c1 0f b6 35 31 ee de 00 <8b> bf 98 00 00 00 31 d2 e8 ec 6b ff ff eb 83 48 8d 3d 76 dd 19 00 RSP: 002b:00007f602f089100 EFLAGS: 00010202 RAX: 0000000000000001 RBX: 00007f602f0896c0 RCX: 00007f602e32c656 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00007f602e503fa0 RBP: 00007f602e503fa0 R08: 0000000000000000 R09: 00007ffe1d375a27 R10: 0000000000000008 R11: 0000000000000246 R12: ffffffffffffffa8 R13: 000000000000000b R14: 00007ffe1d375940 R15: 00007ffe1d375a28 ---------------- Code disassembly (best guess): 0: 00 01 add %al,(%rcx) 2: 00 00 add %al,(%rax) 4: 66 89 8c 24 90 00 00 mov %cx,0x90(%rsp) b: 00 c: 41 0f b6 07 movzbl (%r15),%eax 10: 44 38 e0 cmp %r12b,%al 13: 7f 08 jg 0x1d 15: 84 c0 test %al,%al 17: 0f 85 26 07 00 00 jne 0x743 1d: 0f b6 03 movzbl (%rbx),%eax 20: 84 c0 test %al,%al 22: 0f 84 b0 00 00 00 je 0xd8 28: f3 90 pause * 2a: 41 83 ed 01 sub $0x1,%r13d <-- trapping instruction 2e: 75 cf jne 0xffffffff 30: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 37: fc ff df 3a: 48 8b 74 24 20 mov 0x20(%rsp),%rsi 3f: 48 rex.W