================================ WARNING: inconsistent lock state 5.15.164-syzkaller #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz.4.30/3723 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff8880b9b35bb8 (lock#9){?.+.}-{2:2}, at: local_lock_acquire+0xd/0x170 include/linux/local_lock_internal.h:28 {HARDIRQ-ON-W} state was registered at: lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623 local_lock_acquire+0x29/0x170 include/linux/local_lock_internal.h:29 __mmap_lock_do_trace_acquire_returned+0x7c/0x340 mm/mmap_lock.c:237 do_user_addr_fault arch/x86/mm/fault.c:1308 [inline] handle_page_fault arch/x86/mm/fault.c:1445 [inline] exc_page_fault+0x596/0x700 arch/x86/mm/fault.c:1501 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:568 irq event stamp: 14 hardirqs last enabled at (13): [] lock_page_memcg+0x264/0x4d0 mm/memcontrol.c:2056 hardirqs last disabled at (14): [] sysvec_call_function_single+0xa/0xb0 arch/x86/kernel/smp.c:243 softirqs last enabled at (0): [] copy_process+0x13b9/0x3ef0 kernel/fork.c:2151 softirqs last disabled at (0): [<0000000000000000>] 0x0 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(lock#9); lock(lock#9); *** DEADLOCK *** 6 locks held by syz.4.30/3723: #0: ffff88807bcf7128 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:136 [inline] #0: ffff88807bcf7128 (&mm->mmap_lock){++++}-{3:3}, at: do_user_addr_fault arch/x86/mm/fault.c:1298 [inline] #0: ffff88807bcf7128 (&mm->mmap_lock){++++}-{3:3}, at: handle_page_fault arch/x86/mm/fault.c:1445 [inline] #0: ffff88807bcf7128 (&mm->mmap_lock){++++}-{3:3}, at: exc_page_fault+0x181/0x700 arch/x86/mm/fault.c:1501 #1: ffffffff8c91fb20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x5/0x30 include/linux/rcupdate.h:311 #2: ffff88801e41a858 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:363 [inline] #2: ffff88801e41a858 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: filemap_map_pages+0xbc5/0x15c0 mm/filemap.c:3324 #3: ffffffff8c91fb20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30 #4: ffffffff8c91fb20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x5/0x30 include/linux/rcupdate.h:311 #5: ffff88807bcf7128 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:136 [inline] #5: ffff88807bcf7128 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x23e/0x930 kernel/bpf/stackmap.c:185 stack backtrace: CPU: 1 PID: 3723 Comm: syz.4.30 Not tainted 5.15.164-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106 valid_state+0x134/0x1c0 kernel/locking/lockdep.c:3932 mark_lock_irq+0xa8/0xba0 kernel/locking/lockdep.c:4135 mark_lock+0x21a/0x340 kernel/locking/lockdep.c:4591 mark_usage kernel/locking/lockdep.c:4483 [inline] __lock_acquire+0xb5c/0x1ff0 kernel/locking/lockdep.c:4966 lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623 local_lock_acquire+0x29/0x170 include/linux/local_lock_internal.h:29 __mmap_lock_do_trace_acquire_returned+0x7c/0x340 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:137 [inline] stack_map_get_build_id_offset+0x612/0x930 kernel/bpf/stackmap.c:185 __bpf_get_stack+0x495/0x570 kernel/bpf/stackmap.c:496 ____bpf_get_stack_raw_tp kernel/trace/bpf_trace.c:1490 [inline] bpf_get_stack_raw_tp+0x1b2/0x220 kernel/trace/bpf_trace.c:1480 bpf_prog_ec3b2eefa702d8d3+0x3a/0x870 bpf_dispatcher_nop_func include/linux/bpf.h:790 [inline] __bpf_prog_run include/linux/filter.h:628 [inline] bpf_prog_run include/linux/filter.h:635 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:1880 [inline] bpf_trace_run2+0x19e/0x340 kernel/trace/bpf_trace.c:1917 trace_tlb_flush+0xed/0x110 include/trace/events/tlb.h:38 flush_tlb_func+0x480/0x590 arch/x86/mm/tlb.c:851 flush_smp_call_function_queue+0x2b5/0x760 kernel/smp.c:628 __sysvec_call_function_single+0x9a/0x250 arch/x86/kernel/smp.c:248 sysvec_call_function_single+0x89/0xb0 arch/x86/kernel/smp.c:243 asm_sysvec_call_function_single+0x16/0x20 arch/x86/include/asm/idtentry.h:646 RIP: 0010:rcu_dynticks_curr_cpu_in_eqs kernel/rcu/tree.c:331 [inline] RIP: 0010:rcu_is_watching+0x36/0xa0 kernel/rcu/tree.c:1123 Code: e8 df 08 c8 08 89 c3 83 f8 08 73 72 49 bf 00 00 00 00 00 fc ff df 4c 8d 34 dd 00 28 3b 8c 4c 89 f0 48 c1 e8 03 42 80 3c 38 00 <74> 08 4c 89 f7 e8 d0 1c 5f 00 48 c7 c3 08 b3 03 00 49 03 1e 48 89 RSP: 0000:ffffc900030e7940 EFLAGS: 00000246 RAX: 1ffffffff1876501 RBX: 0000000000000001 RCX: ffff888022eed940 RDX: 0000000000000000 RSI: ffffffff8ad8f7e0 RDI: ffffffff8ad8f7a0 RBP: 1ffff110023d1a11 R08: dffffc0000000000 R09: fffff9400039e7e9 R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000 R13: dffffc0000000000 R14: ffffffff8c3b2808 R15: dffffc0000000000 rcu_read_unlock include/linux/rcupdate.h:768 [inline] __unlock_page_memcg+0xc3/0x110 mm/memcontrol.c:2090 do_set_pte+0x45b/0x660 mm/memory.c:4039 filemap_map_pages+0xf5e/0x15c0 mm/filemap.c:3344 do_fault_around mm/memory.c:4213 [inline] do_read_fault mm/memory.c:4228 [inline] do_fault mm/memory.c:4362 [inline] handle_pte_fault mm/memory.c:4621 [inline] __handle_mm_fault mm/memory.c:4756 [inline] handle_mm_fault+0x341b/0x5950 mm/memory.c:4854 do_user_addr_fault arch/x86/mm/fault.c:1357 [inline] handle_page_fault arch/x86/mm/fault.c:1445 [inline] exc_page_fault+0x271/0x700 arch/x86/mm/fault.c:1501 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:568 RIP: 0033:0x7fb6b0fed7f0 Code: Unable to access opcode bytes at RIP 0x7fb6b0fed7c6. RSP: 002b:00007fb6af4d3118 EFLAGS: 00010246 RAX: fffffffffffffeb8 RBX: 00007fb6af4d36c0 RCX: 00007fb6b108aea9 RDX: 00007fb6af4d3d78 RSI: 0000000000000058 RDI: 00007fb6af4d36c0 RBP: 0000000000000000 R08: 00007fb6af4d36c0 R09: 00007ffd145bb107 R10: 0000000000000008 R11: 0000000000000206 R12: ffffffffffffffa8 R13: 000000000000000b R14: 00007ffd145bb020 R15: 00007ffd145bb108 ---------------- Code disassembly (best guess): 0: e8 df 08 c8 08 call 0x8c808e4 5: 89 c3 mov %eax,%ebx 7: 83 f8 08 cmp $0x8,%eax a: 73 72 jae 0x7e c: 49 bf 00 00 00 00 00 movabs $0xdffffc0000000000,%r15 13: fc ff df 16: 4c 8d 34 dd 00 28 3b lea -0x73c4d800(,%rbx,8),%r14 1d: 8c 1e: 4c 89 f0 mov %r14,%rax 21: 48 c1 e8 03 shr $0x3,%rax 25: 42 80 3c 38 00 cmpb $0x0,(%rax,%r15,1) * 2a: 74 08 je 0x34 <-- trapping instruction 2c: 4c 89 f7 mov %r14,%rdi 2f: e8 d0 1c 5f 00 call 0x5f1d04 34: 48 c7 c3 08 b3 03 00 mov $0x3b308,%rbx 3b: 49 03 1e add (%r14),%rbx 3e: 48 rex.W 3f: 89 .byte 0x89