================================ WARNING: inconsistent lock state 5.15.157-syzkaller #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz-executor.1/11351 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff8880b9a35bb8 (lock#11){?.+.}-{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_write_lock_killable include/linux/mmap_lock.h:88 [inline] __bprm_mm_init fs/exec.c:259 [inline] bprm_mm_init fs/exec.c:378 [inline] alloc_bprm+0x6c7/0x700 fs/exec.c:1538 kernel_execve+0x49/0x9b0 fs/exec.c:1974 call_usermodehelper_exec_async+0x22f/0x370 kernel/umh.c:112 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:300 irq event stamp: 26 hardirqs last enabled at (25): [] do_user_addr_fault arch/x86/mm/fault.c:1285 [inline] hardirqs last enabled at (25): [] handle_page_fault arch/x86/mm/fault.c:1476 [inline] hardirqs last enabled at (25): [] exc_page_fault+0x10a/0x740 arch/x86/mm/fault.c:1532 hardirqs last disabled at (26): [] 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#11); lock(lock#11); *** DEADLOCK *** 5 locks held by syz-executor.1/11351: #0: ffff888024522b28 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:136 [inline] #0: ffff888024522b28 (&mm->mmap_lock){++++}-{3:3}, at: do_user_addr_fault arch/x86/mm/fault.c:1329 [inline] #0: ffff888024522b28 (&mm->mmap_lock){++++}-{3:3}, at: handle_page_fault arch/x86/mm/fault.c:1476 [inline] #0: ffff888024522b28 (&mm->mmap_lock){++++}-{3:3}, at: exc_page_fault+0x181/0x740 arch/x86/mm/fault.c:1532 #1: ffff8880b9a35bb8 (lock#11){?.+.}-{2:2}, at: local_lock_acquire+0xd/0x170 include/linux/local_lock_internal.h:28 #2: ffffffff8c91fb20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30 #3: ffffffff8c91fb20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x5/0x30 include/linux/rcupdate.h:311 #4: ffff888024522b28 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:136 [inline] #4: ffff888024522b28 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x23e/0x930 kernel/bpf/stackmap.c:185 stack backtrace: CPU: 0 PID: 11351 Comm: syz-executor.1 Not tainted 5.15.157-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/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_e6cf5f9c69743609+0x3a/0x5a0 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:lock_acquire+0x252/0x4f0 kernel/locking/lockdep.c:5627 Code: 2b 00 74 08 4c 89 f7 e8 fc 86 67 00 f6 44 24 61 02 0f 85 84 01 00 00 41 f7 c7 00 02 00 00 74 01 fb 48 c7 44 24 40 0e 36 e0 45 <4b> c7 44 25 00 00 00 00 00 43 c7 44 25 09 00 00 00 00 43 c7 44 25 RSP: 0000:ffffc90003037cc0 EFLAGS: 00000206 RAX: 0000000000000001 RBX: 1ffff92000606fa4 RCX: 1ffff92000606f44 RDX: dffffc0000000000 RSI: ffffffff8a8b3c20 RDI: ffffffff8ad8f500 RBP: ffffc90003037e18 R08: dffffc0000000000 R09: fffffbfff1f7ee19 R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff92000606fa0 R13: dffffc0000000000 R14: ffffc90003037d20 R15: 0000000000000246 rcu_lock_acquire+0x20/0x30 include/linux/rcupdate.h:312 rcu_read_lock include/linux/rcupdate.h:739 [inline] get_mem_cgroup_from_mm+0x31/0x260 mm/memcontrol.c:986 get_mm_memcg_path+0x1b/0x550 mm/mmap_lock.c:202 __mmap_lock_do_trace_acquire_returned+0x84/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 RIP: 0033:0x7f74e97f4d37 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 62 91 04 00 eb c1 0f b6 35 79 09 ca 00 <8b> bf 98 00 00 00 31 d2 e8 5c 6f ff ff eb 83 48 8d 3d a2 53 09 00 RSP: 002b:00007f74e7db0180 EFLAGS: 00010202 RAX: 0000000000000001 RBX: 00007f74e7db06c0 RCX: 00007f74e9812496 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00007f74e996bf80 RBP: 00007f74e996bf80 R08: 0000000000000000 R09: 00007ffe66db64e7 R10: 0000000000000008 R11: 0000000000000246 R12: ffffffffffffffb0 R13: 000000000000000b R14: 00007ffe66db6400 R15: 00007ffe66db64e8 ---------------- Code disassembly (best guess): 0: 2b 00 sub (%rax),%eax 2: 74 08 je 0xc 4: 4c 89 f7 mov %r14,%rdi 7: e8 fc 86 67 00 call 0x678708 c: f6 44 24 61 02 testb $0x2,0x61(%rsp) 11: 0f 85 84 01 00 00 jne 0x19b 17: 41 f7 c7 00 02 00 00 test $0x200,%r15d 1e: 74 01 je 0x21 20: fb sti 21: 48 c7 44 24 40 0e 36 movq $0x45e0360e,0x40(%rsp) 28: e0 45 * 2a: 4b c7 44 25 00 00 00 movq $0x0,0x0(%r13,%r12,1) <-- trapping instruction 31: 00 00 33: 43 c7 44 25 09 00 00 movl $0x0,0x9(%r13,%r12,1) 3a: 00 00 3c: 43 rex.XB 3d: c7 .byte 0xc7 3e: 44 rex.R 3f: 25 .byte 0x25