================================ WARNING: inconsistent lock state 6.10.0-syzkaller-04559-g7d30b8aa4fc3 #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz.4.121/5664 [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_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_acquire_returned+0xa8/0x630 mm/mmap_lock.c:237 __mmap_lock_trace_acquire_returned include/linux/mmap_lock.h:36 [inline] mmap_read_lock include/linux/mmap_lock.h:145 [inline] exit_mm+0x2de/0x310 kernel/exit.c:542 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: 18 hardirqs last enabled at (17): [] do_user_addr_fault arch/x86/mm/fault.c:1283 [inline] hardirqs last enabled at (17): [] handle_page_fault arch/x86/mm/fault.c:1481 [inline] hardirqs last enabled at (17): [] exc_page_fault+0x113/0x8c0 arch/x86/mm/fault.c:1539 hardirqs last disabled at (18): [] 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 *** 5 locks held by syz.4.121/5664: #0: ffff8880228e1808 (&vma->vm_lock->lock){++++}-{3:3}, at: vma_start_read include/linux/mm.h:683 [inline] #0: ffff8880228e1808 (&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: ffff88802caf1858 (ptlock_ptr(ptdesc)#2){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline] #2: ffff88802caf1858 (ptlock_ptr(ptdesc)#2){+.+.}-{2:2}, at: __pte_offset_map_lock+0x1ba/0x300 mm/pgtable-generic.c:375 #3: ffffffff8e735fe0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:327 [inline] #3: ffffffff8e735fe0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:839 [inline] #3: ffffffff8e735fe0 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2405 [inline] #3: ffffffff8e735fe0 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1fc/0x540 kernel/trace/bpf_trace.c:2447 #4: ffff888023da4d98 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:163 [inline] #4: ffff888023da4d98 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x237/0x9d0 kernel/bpf/stackmap.c:141 stack backtrace: CPU: 1 PID: 5664 Comm: syz.4.121 Not tainted 6.10.0-syzkaller-04559-g7d30b8aa4fc3 #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+0x43/0x47 bpf_dispatcher_nop_func include/linux/bpf.h:1252 [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:pv_wait_head_or_lock kernel/locking/qspinlock_paravirt.h:430 [inline] RIP: 0010:__pv_queued_spin_lock_slowpath+0x781/0xdc0 kernel/locking/qspinlock.c:508 Code: ff 42 0f b6 04 2b 84 c0 75 6c 66 c7 84 24 b0 00 00 00 00 01 48 8b 44 24 40 42 0f b6 04 28 84 c0 75 77 41 80 3e 00 74 0c f3 90 <41> ff c4 75 d2 e9 a0 00 00 00 4c 89 f7 be 02 00 00 00 e8 b8 c7 40 RSP: 0000:ffffc9000dbbf620 EFLAGS: 00000202 RAX: 0000000000000000 RBX: 1ffff92001b77eda RCX: ffffc9000dbbf601 RDX: 0000000000000001 RSI: 0000000000000002 RDI: ffff88802caf1842 RBP: ffffc9000dbbf758 R08: ffff88802caf1843 R09: 1ffff1100595e308 R10: dffffc0000000000 R11: ffffed100595e309 R12: 00000000ffff815a R13: dffffc0000000000 R14: ffff88802caf1840 R15: ffffc9000dbbf6e0 pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:584 [inline] queued_spin_lock_slowpath+0x42/0x50 arch/x86/include/asm/qspinlock.h:51 queued_spin_lock include/asm-generic/qspinlock.h:114 [inline] do_raw_spin_lock+0x272/0x370 kernel/locking/spinlock_debug.c:116 spin_lock include/linux/spinlock.h:351 [inline] __pte_offset_map_lock+0x1ba/0x300 mm/pgtable-generic.c:375 pte_offset_map_lock include/linux/mm.h:3025 [inline] do_anonymous_page mm/memory.c:4431 [inline] do_pte_missing mm/memory.c:3895 [inline] handle_pte_fault+0x1c9a/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:0x7faa1be47c47 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 f6 12 00 eb c1 0f b6 35 81 da de 00 <8b> bf 98 00 00 00 31 d2 e8 5c 64 ff ff eb 83 48 8d 3d 35 de 19 00 RSP: 002b:00007faa1cd16100 EFLAGS: 00010202 RAX: 0000000000000001 RBX: 00007faa1cd166c0 RCX: 00007faa1bf2ddd6 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00007faa1c105f80 RBP: 00007faa1c105f80 R08: 0000000000000000 R09: 00007ffc5c56d507 R10: 0000000000000008 R11: 0000000000000246 R12: ffffffffffffffa8 R13: 000000000000000b R14: 00007ffc5c56d420 R15: 00007ffc5c56d508 ---------------- Code disassembly (best guess): 0: ff 42 0f incl 0xf(%rdx) 3: b6 04 mov $0x4,%dh 5: 2b 84 c0 75 6c 66 c7 sub -0x3899938b(%rax,%rax,8),%eax c: 84 24 b0 test %ah,(%rax,%rsi,4) f: 00 00 add %al,(%rax) 11: 00 00 add %al,(%rax) 13: 01 48 8b add %ecx,-0x75(%rax) 16: 44 24 40 rex.R and $0x40,%al 19: 42 0f b6 04 28 movzbl (%rax,%r13,1),%eax 1e: 84 c0 test %al,%al 20: 75 77 jne 0x99 22: 41 80 3e 00 cmpb $0x0,(%r14) 26: 74 0c je 0x34 28: f3 90 pause * 2a: 41 ff c4 inc %r12d <-- trapping instruction 2d: 75 d2 jne 0x1 2f: e9 a0 00 00 00 jmp 0xd4 34: 4c 89 f7 mov %r14,%rdi 37: be 02 00 00 00 mov $0x2,%esi 3c: e8 .byte 0xe8 3d: b8 .byte 0xb8 3e: c7 .byte 0xc7 3f: 40 rex