================================ WARNING: inconsistent lock state 6.10.0-syzkaller-04806-g8b0f0bb27c32 #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz.0.1193/8659 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff88802c138aa0 (lock#13){?.+.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff88802c138aa0 (lock#13){?.+.}-{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_write_lock_killable include/linux/mmap_lock.h:123 [inline] vm_mmap_pgoff+0x2be/0x360 mm/util.c:576 ksys_mmap_pgoff+0x7d/0x5d0 mm/mmap.c:1443 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 irq event stamp: 20582 hardirqs last enabled at (20581): [] irqentry_exit+0x3b/0x90 kernel/entry/common.c:357 hardirqs last disabled at (20582): [] sysvec_call_function_single+0xe/0xb0 arch/x86/kernel/smp.c:266 softirqs last enabled at (17368): [] softirq_handle_end kernel/softirq.c:400 [inline] softirqs last enabled at (17368): [] handle_softirqs+0x5be/0x8f0 kernel/softirq.c:582 softirqs last disabled at (17361): [] __do_softirq kernel/softirq.c:588 [inline] softirqs last disabled at (17361): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last disabled at (17361): [] __irq_exit_rcu kernel/softirq.c:637 [inline] softirqs last disabled at (17361): [] irq_exit_rcu+0xbb/0x120 kernel/softirq.c:649 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(lock#13); lock(lock#13); *** DEADLOCK *** 6 locks held by syz.0.1193/8659: #0: ffff88801d8c1e18 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_lock include/linux/mmap_lock.h:144 [inline] #0: ffff88801d8c1e18 (&mm->mmap_lock){++++}-{3:3}, at: __mm_populate+0x21d/0x380 mm/gup.c:2125 #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: do_fault_around mm/memory.c:4878 [inline] #1: ffffffff8dbb4e60 (rcu_read_lock){....}-{1:2}, at: do_read_fault mm/memory.c:4912 [inline] #1: ffffffff8dbb4e60 (rcu_read_lock){....}-{1:2}, at: do_fault mm/memory.c:5051 [inline] #1: ffffffff8dbb4e60 (rcu_read_lock){....}-{1:2}, at: do_pte_missing mm/memory.c:3897 [inline] #1: ffffffff8dbb4e60 (rcu_read_lock){....}-{1:2}, at: handle_pte_fault mm/memory.c:5381 [inline] #1: ffffffff8dbb4e60 (rcu_read_lock){....}-{1:2}, at: __handle_mm_fault+0x386f/0x52a0 mm/memory.c:5524 #2: ffffffff8dbb4e60 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:327 [inline] #2: ffffffff8dbb4e60 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:839 [inline] #2: ffffffff8dbb4e60 (rcu_read_lock){....}-{1:2}, at: filemap_map_pages+0x182/0x1440 mm/filemap.c:3615 #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: __pte_offset_map+0x42/0x540 mm/pgtable-generic.c:287 #4: ffff888025db4738 (ptlock_ptr(ptdesc)#2){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline] #4: ffff888025db4738 (ptlock_ptr(ptdesc)#2){+.+.}-{2:2}, at: __pte_offset_map_lock+0xf1/0x300 mm/pgtable-generic.c:375 #5: ffffffff8dbb4e60 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:327 [inline] #5: ffffffff8dbb4e60 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:839 [inline] #5: ffffffff8dbb4e60 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2405 [inline] #5: ffffffff8dbb4e60 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1c2/0x590 kernel/trace/bpf_trace.c:2447 stack backtrace: CPU: 1 PID: 8659 Comm: syz.0.1193 Not tainted 6.10.0-syzkaller-04806-g8b0f0bb27c32 #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:__sanitizer_cov_trace_pc+0x0/0x60 kernel/kcov.c:200 Code: be b0 01 00 00 e8 a0 ff ff ff 31 c0 c3 cc cc cc cc 66 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 0f 1e fa 65 48 8b 15 34 43 75 7e 65 8b 05 35 43 75 7e a9 00 01 RSP: 0018:ffffc90006307780 EFLAGS: 00000246 RAX: 0000000000040000 RBX: ffffea0000b13c00 RCX: ffffc9000dda3000 RDX: 0000000000040000 RSI: ffffffff81c19031 RDI: 0000000000000007 RBP: 0000000000000000 R08: 0000000000000007 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000005 R12: 000000000000041f R13: 0000000000000001 R14: dffffc0000000000 R15: 1ffff92000c60f1e const_folio_flags.constprop.0+0x56/0x150 include/linux/page-flags.h:314 folio_test_readahead include/linux/page-flags.h:564 [inline] next_uptodate_folio+0x178/0x4b0 mm/filemap.c:3481 filemap_map_pages+0x5d8/0x1440 mm/filemap.c:3653 do_fault_around mm/memory.c:4879 [inline] do_read_fault mm/memory.c:4912 [inline] do_fault mm/memory.c:5051 [inline] do_pte_missing mm/memory.c:3897 [inline] handle_pte_fault mm/memory.c:5381 [inline] __handle_mm_fault+0x3907/0x52a0 mm/memory.c:5524 handle_mm_fault+0x476/0xa00 mm/memory.c:5689 faultin_page mm/gup.c:1305 [inline] __get_user_pages+0x475/0x15c0 mm/gup.c:1604 populate_vma_page_range+0x27f/0x3a0 mm/gup.c:2043 __mm_populate+0x1d6/0x380 mm/gup.c:2146 mm_populate include/linux/mm.h:3469 [inline] vm_mmap_pgoff+0x293/0x360 mm/util.c:583 ksys_mmap_pgoff+0x7d/0x5d0 mm/mmap.c:1443 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:0xf73de579 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:00000000f5cf657c EFLAGS: 00000292 ORIG_RAX: 00000000000000c0 RAX: ffffffffffffffda RBX: 0000000020000000 RCX: 0000000000b36000 RDX: 0000000006ebbeee RSI: 0000000000008031 RDI: 00000000ffffffff RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000292 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 ---------------- Code disassembly (best guess): 0: be b0 01 00 00 mov $0x1b0,%esi 5: e8 a0 ff ff ff call 0xffffffaa a: 31 c0 xor %eax,%eax c: c3 ret d: cc int3 e: cc int3 f: cc int3 10: cc int3 11: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) 18: 00 00 1a: 90 nop 1b: 90 nop 1c: 90 nop 1d: 90 nop 1e: 90 nop 1f: 90 nop 20: 90 nop 21: 90 nop 22: 90 nop 23: 90 nop 24: 90 nop 25: 90 nop 26: 90 nop 27: 90 nop 28: 90 nop 29: 90 nop * 2a: f3 0f 1e fa endbr64 <-- trapping instruction 2e: 65 48 8b 15 34 43 75 mov %gs:0x7e754334(%rip),%rdx # 0x7e75436a 35: 7e 36: 65 8b 05 35 43 75 7e mov %gs:0x7e754335(%rip),%eax # 0x7e754372 3d: a9 .byte 0xa9 3e: 00 01 add %al,(%rcx)