================================ WARNING: inconsistent lock state 5.15.160-syzkaller #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz-executor.1/4912 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff8880b9b35bb8 (lock#10){?.+.}-{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 __mmap_lock_trace_acquire_returned include/linux/mmap_lock.h:36 [inline] mmap_read_trylock include/linux/mmap_lock.h:137 [inline] do_user_addr_fault arch/x86/mm/fault.c:1329 [inline] handle_page_fault arch/x86/mm/fault.c:1476 [inline] exc_page_fault+0x59c/0x740 arch/x86/mm/fault.c:1532 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:568 irq event stamp: 2542 hardirqs last enabled at (2541): [] mod_lruvec_page_state include/linux/vmstat.h:497 [inline] hardirqs last enabled at (2541): [] inc_lruvec_page_state include/linux/vmstat.h:549 [inline] hardirqs last enabled at (2541): [] pgtable_pte_page_ctor include/linux/mm.h:2260 [inline] hardirqs last enabled at (2541): [] __pte_alloc_one include/asm-generic/pgalloc.h:66 [inline] hardirqs last enabled at (2541): [] pte_alloc_one+0x265/0x360 arch/x86/mm/pgtable.c:33 hardirqs last disabled at (2542): [] sysvec_call_function_single+0xa/0xb0 arch/x86/kernel/smp.c:243 softirqs last enabled at (2234): [] local_bh_enable+0x5/0x20 include/linux/bottom_half.h:31 softirqs last disabled at (2232): [] local_bh_disable+0x5/0x20 include/linux/bottom_half.h:18 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(lock#10); lock(lock#10); *** DEADLOCK *** 3 locks held by syz-executor.1/4912: #0: ffff888018bf0828 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:136 [inline] #0: ffff888018bf0828 (&mm->mmap_lock){++++}-{3:3}, at: do_user_addr_fault arch/x86/mm/fault.c:1329 [inline] #0: ffff888018bf0828 (&mm->mmap_lock){++++}-{3:3}, at: handle_page_fault arch/x86/mm/fault.c:1476 [inline] #0: ffff888018bf0828 (&mm->mmap_lock){++++}-{3:3}, at: exc_page_fault+0x181/0x740 arch/x86/mm/fault.c:1532 #1: ffffffff8c91fae0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x5/0x30 include/linux/rcupdate.h:311 #2: ffff888018bf0828 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:136 [inline] #2: ffff888018bf0828 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x23e/0x930 kernel/bpf/stackmap.c:185 stack backtrace: CPU: 1 PID: 4912 Comm: syz-executor.1 Not tainted 5.15.160-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/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/0x924 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:PagePoisoned include/linux/page-flags.h:218 [inline] RIP: 0010:page_to_nid include/linux/mm.h:1378 [inline] RIP: 0010:page_pgdat include/linux/mm.h:1553 [inline] RIP: 0010:memcg_slab_post_alloc_hook mm/slab.h:322 [inline] RIP: 0010:slab_post_alloc_hook+0x26e/0x380 mm/slab.h:526 Code: ff e8 06 58 00 00 48 8b 43 38 48 85 c0 74 0b 89 c1 83 e1 01 0f 84 ed 00 00 00 a8 02 0f 85 f6 00 00 00 48 83 e0 fc 4e 89 3c e8 <48> 8b 03 48 83 f8 ff 0f 84 f2 00 00 00 48 c1 e8 3a 48 8b 34 c5 50 RSP: 0000:ffffc90003897b10 EFLAGS: 00000286 RAX: ffff88807abdf100 RBX: ffffea000189b580 RCX: 0000000000000001 RDX: 0000000000000001 RSI: ffffffff8a8b3c20 RDI: ffffffff8ad8f6c0 RBP: 0000000000000801 R08: dffffc0000000000 R09: fffffbfff1bc8cce R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000008 R13: 000000000000000b R14: 0000000000000000 R15: ffff88807c900c80 slab_alloc_node mm/slub.c:3220 [inline] slab_alloc mm/slub.c:3228 [inline] kmem_cache_alloc+0xf3/0x280 mm/slub.c:3233 anon_vma_alloc mm/rmap.c:90 [inline] __anon_vma_prepare+0xb9/0x410 mm/rmap.c:199 anon_vma_prepare include/linux/rmap.h:152 [inline] do_anonymous_page mm/memory.c:3806 [inline] handle_pte_fault mm/memory.c:4619 [inline] __handle_mm_fault mm/memory.c:4756 [inline] handle_mm_fault+0x4f4b/0x5950 mm/memory.c:4854 do_user_addr_fault arch/x86/mm/fault.c:1388 [inline] handle_page_fault arch/x86/mm/fault.c:1476 [inline] exc_page_fault+0x271/0x740 arch/x86/mm/fault.c:1532 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:568 RIP: 0033:0x7fc3cce81246 Code: 8d 3c 30 4c 89 de 4c 89 54 24 38 e8 f4 ad 02 00 4c 8b 54 24 38 85 c0 0f 85 57 01 00 00 48 8b 44 24 28 48 89 df 4c 89 54 24 38 <4c> 89 93 98 06 00 00 48 89 83 90 06 00 00 48 8d 83 10 03 00 00 4c RSP: 002b:00007ffe233e4e10 EFLAGS: 00010246 RAX: 00007fc3cb9c3000 RBX: 00007fc3cb9e36c0 RCX: 00007fc3cceac027 RDX: 0000000000000003 RSI: 0000000000020000 RDI: 00007fc3cb9e36c0 RBP: 0000000000000000 R08: 00000000ffffffff R09: 0000000000000000 R10: 0000000000021000 R11: 0000000000000206 R12: 00007ffe233e5060 R13: ffffffffffffffc0 R14: 0000000000001000 R15: 0000000000000000 ---------------- Code disassembly (best guess), 1 bytes skipped: 0: e8 06 58 00 00 call 0x580b 5: 48 8b 43 38 mov 0x38(%rbx),%rax 9: 48 85 c0 test %rax,%rax c: 74 0b je 0x19 e: 89 c1 mov %eax,%ecx 10: 83 e1 01 and $0x1,%ecx 13: 0f 84 ed 00 00 00 je 0x106 19: a8 02 test $0x2,%al 1b: 0f 85 f6 00 00 00 jne 0x117 21: 48 83 e0 fc and $0xfffffffffffffffc,%rax 25: 4e 89 3c e8 mov %r15,(%rax,%r13,8) * 29: 48 8b 03 mov (%rbx),%rax <-- trapping instruction 2c: 48 83 f8 ff cmp $0xffffffffffffffff,%rax 30: 0f 84 f2 00 00 00 je 0x128 36: 48 c1 e8 3a shr $0x3a,%rax 3a: 48 rex.W 3b: 8b .byte 0x8b 3c: 34 c5 xor $0xc5,%al 3e: 50 push %rax