================================ WARNING: inconsistent lock state 6.10.0-syzkaller-05505-gb1bc554e009e #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz.1.32/5386 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff88802c338aa0 (lock#14){?.+.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff88802c338aa0 (lock#14){?.+.}-{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:5753 [inline] lock_acquire+0x1b1/0x560 kernel/locking/lockdep.c:5718 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:5716 [inline] lock_mm_and_find_vma+0xeb/0x6a0 mm/memory.c:5776 do_user_addr_fault+0x2b5/0x13f0 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 irq event stamp: 80724 hardirqs last enabled at (80723): [] irqentry_exit+0x3b/0x90 kernel/entry/common.c:357 hardirqs last disabled at (80724): [] sysvec_call_function_single+0xe/0xb0 arch/x86/kernel/smp.c:266 softirqs last enabled at (70378): [] softirq_handle_end kernel/softirq.c:400 [inline] softirqs last enabled at (70378): [] handle_softirqs+0x5be/0x8f0 kernel/softirq.c:582 softirqs last disabled at (70373): [] __do_softirq kernel/softirq.c:588 [inline] softirqs last disabled at (70373): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last disabled at (70373): [] __irq_exit_rcu kernel/softirq.c:637 [inline] softirqs last disabled at (70373): [] irq_exit_rcu+0xbb/0x120 kernel/softirq.c:649 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(lock#14); lock(lock#14); *** DEADLOCK *** 5 locks held by syz.1.32/5386: #0: ffff88801c150b18 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:163 [inline] #0: ffff88801c150b18 (&mm->mmap_lock){++++}-{3:3}, at: get_mmap_lock_carefully mm/memory.c:5716 [inline] #0: ffff88801c150b18 (&mm->mmap_lock){++++}-{3:3}, at: lock_mm_and_find_vma+0x35/0x6a0 mm/memory.c:5776 #1: ffffffff8dbb4e60 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:327 [inline] #1: ffffffff8dbb4e60 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:839 [inline] #1: ffffffff8dbb4e60 (rcu_read_lock){....}-{1:2}, at: __pte_offset_map+0x42/0x540 mm/pgtable-generic.c:287 #2: ffff888026ffa438 (ptlock_ptr(ptdesc)#2){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline] #2: ffff888026ffa438 (ptlock_ptr(ptdesc)#2){+.+.}-{2:2}, at: __pte_offset_map_lock+0xf1/0x300 mm/pgtable-generic.c:375 #3: ffffffff8dbb4e60 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:327 [inline] #3: ffffffff8dbb4e60 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:839 [inline] #3: ffffffff8dbb4e60 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2405 [inline] #3: ffffffff8dbb4e60 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1c2/0x590 kernel/trace/bpf_trace.c:2447 #4: ffff88801c150b18 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:163 [inline] #4: ffff88801c150b18 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x28a/0x760 kernel/bpf/stackmap.c:141 stack backtrace: CPU: 3 PID: 5386 Comm: syz.1.32 Not tainted 6.10.0-syzkaller-05505-gb1bc554e009e #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 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:3970 [inline] valid_state kernel/locking/lockdep.c:4012 [inline] mark_lock_irq kernel/locking/lockdep.c:4215 [inline] mark_lock+0x923/0xc60 kernel/locking/lockdep.c:4677 mark_usage kernel/locking/lockdep.c:4563 [inline] __lock_acquire+0x1359/0x3b30 kernel/locking/lockdep.c:5090 lock_acquire kernel/locking/lockdep.c:5753 [inline] lock_acquire+0x1b1/0x560 kernel/locking/lockdep.c:5718 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+0x602/0x760 kernel/bpf/stackmap.c:141 __bpf_get_stack+0x68a/0x710 kernel/bpf/stackmap.c:449 ____bpf_get_stack_raw_tp kernel/trace/bpf_trace.c:1997 [inline] bpf_get_stack_raw_tp+0x124/0x160 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+0x231/0x590 kernel/trace/bpf_trace.c:2447 trace_tlb_flush+0xf3/0x170 include/trace/events/tlb.h:38 csd_do_func kernel/smp.c:134 [inline] __flush_smp_call_function_queue+0x27a/0x8c0 kernel/smp.c:512 __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:smp_call_function_many_cond+0x36c/0x1420 kernel/smp.c:851 Code: 2e 0c 00 48 8b 74 24 10 8b 7c 24 38 48 8b 44 24 28 ff d0 0f 1f 00 31 ff 89 c5 89 c6 e8 cd 28 0c 00 40 84 ed 0f 85 a5 03 00 00 1f 2e 0c 00 31 ff 89 de e8 b6 28 0c 00 84 db 0f 84 0e 02 00 00 RSP: 0018:ffffc90002e17248 EFLAGS: 00000246 RAX: 0000000000040000 RBX: 0000000000000001 RCX: ffffc90007d51000 RDX: 0000000000040000 RSI: ffffffff818275d1 RDI: 0000000000000007 RBP: 0000000000000000 R08: 0000000000000007 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000007 R12: 0000000000000003 R13: 0000000000000003 R14: ffffffff813e3b00 R15: ffff88802c33fe80 on_each_cpu_cond_mask+0x40/0x90 kernel/smp.c:1023 kvm_flush_tlb_multi+0x267/0x3b0 arch/x86/kernel/kvm.c:677 __flush_tlb_multi arch/x86/include/asm/paravirt.h:91 [inline] flush_tlb_multi arch/x86/mm/tlb.c:941 [inline] flush_tlb_mm_range+0x293/0x330 arch/x86/mm/tlb.c:1027 flush_tlb_page arch/x86/include/asm/tlbflush.h:254 [inline] ptep_clear_flush+0x136/0x180 mm/pgtable-generic.c:101 wp_page_copy mm/memory.c:3351 [inline] do_wp_page+0x1461/0x3290 mm/memory.c:3677 handle_pte_fault mm/memory.c:5397 [inline] __handle_mm_fault+0x2311/0x52a0 mm/memory.c:5524 handle_mm_fault+0x476/0xa00 mm/memory.c:5689 do_user_addr_fault+0x7a3/0x13f0 arch/x86/mm/fault.c:1389 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: 0010:copy_user_generic arch/x86/include/asm/uaccess_64.h:110 [inline] RIP: 0010:raw_copy_to_user arch/x86/include/asm/uaccess_64.h:131 [inline] RIP: 0010:copy_to_user_iter lib/iov_iter.c:25 [inline] RIP: 0010:iterate_iovec include/linux/iov_iter.h:51 [inline] RIP: 0010:iterate_and_advance2 include/linux/iov_iter.h:247 [inline] RIP: 0010:iterate_and_advance include/linux/iov_iter.h:271 [inline] RIP: 0010:_copy_to_iter+0x48f/0xfc0 lib/iov_iter.c:185 Code: 45 e8 b5 18 10 fd 48 8b 4c 24 10 89 ee 48 8b 44 24 20 4c 8d 34 01 4c 89 f7 e8 4d cb 6d fd 0f 01 cb 48 89 e9 4c 89 ff 4c 89 f6 a4 0f 1f 00 0f 01 ca 48 89 e8 48 29 eb 48 29 c8 48 01 cb 48 01 RSP: 0018:ffffc90002e17950 EFLAGS: 00050246 RAX: 0000000000000001 RBX: 0000000000001000 RCX: 0000000000000e80 RDX: 0000000000000000 RSI: ffff888012e31180 RDI: 0000000020f88000 RBP: 0000000000001000 R08: 0000000000000000 R09: ffffed10025c63ff R10: ffff888012e31fff R11: 0000000000000000 R12: 0000000000f87b80 R13: ffffc90002e17d40 R14: ffff888012e31000 R15: 0000000020f87e80 copy_page_to_iter lib/iov_iter.c:362 [inline] copy_page_to_iter+0xf1/0x180 lib/iov_iter.c:349 process_vm_rw_pages mm/process_vm_access.c:45 [inline] process_vm_rw_single_vec mm/process_vm_access.c:118 [inline] process_vm_rw_core.constprop.0+0x5c9/0xa10 mm/process_vm_access.c:216 process_vm_rw+0x301/0x360 mm/process_vm_access.c:284 __do_sys_process_vm_readv mm/process_vm_access.c:296 [inline] __se_sys_process_vm_readv mm/process_vm_access.c:292 [inline] __ia32_sys_process_vm_readv+0xdf/0x1b0 mm/process_vm_access.c:292 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0x73/0x120 arch/x86/entry/common.c:386 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411 entry_SYSENTER_compat_after_hwframe+0x84/0x8e RIP: 0023:0xf7faf579 Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00 RSP: 002b:00000000f5d6657c EFLAGS: 00000292 ORIG_RAX: 000000000000015b RAX: ffffffffffffffda RBX: 000000000000001b RCX: 0000000020008400 RDX: 0000000000000002 RSI: 0000000020008640 RDI: 0000000000000286 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000292 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 ---------------- Code disassembly (best guess): 0: 2e 0c 00 cs or $0x0,%al 3: 48 8b 74 24 10 mov 0x10(%rsp),%rsi 8: 8b 7c 24 38 mov 0x38(%rsp),%edi c: 48 8b 44 24 28 mov 0x28(%rsp),%rax 11: ff d0 call *%rax 13: 0f 1f 00 nopl (%rax) 16: 31 ff xor %edi,%edi 18: 89 c5 mov %eax,%ebp 1a: 89 c6 mov %eax,%esi 1c: e8 cd 28 0c 00 call 0xc28ee 21: 40 84 ed test %bpl,%bpl 24: 0f 85 a5 03 00 00 jne 0x3cf * 2a: e8 1f 2e 0c 00 call 0xc2e4e <-- trapping instruction 2f: 31 ff xor %edi,%edi 31: 89 de mov %ebx,%esi 33: e8 b6 28 0c 00 call 0xc28ee 38: 84 db test %bl,%bl 3a: 0f 84 0e 02 00 00 je 0x24e