================================ WARNING: inconsistent lock state 6.1.93-syzkaller #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz-executor.2/5037 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff8880b9835e90 (lock#10){?.+.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b9835e90 (lock#10){?.+.}-{2:2}, at: __mmap_lock_do_trace_acquire_returned+0x84/0x670 mm/mmap_lock.c:237 {HARDIRQ-ON-W} state was registered at: lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_acquire_returned+0x9d/0x670 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] get_mmap_lock_carefully mm/memory.c:5304 [inline] lock_mm_and_find_vma+0x219/0x2e0 mm/memory.c:5366 do_user_addr_fault arch/x86/mm/fault.c:1312 [inline] handle_page_fault arch/x86/mm/fault.c:1431 [inline] exc_page_fault+0x169/0x620 arch/x86/mm/fault.c:1487 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:570 irq event stamp: 2 hardirqs last enabled at (1): [] raw_spin_rq_unlock_irq kernel/sched/sched.h:1366 [inline] hardirqs last enabled at (1): [] finish_lock_switch kernel/sched/core.c:5004 [inline] hardirqs last enabled at (1): [] finish_task_switch+0x1ca/0x810 kernel/sched/core.c:5122 hardirqs last disabled at (2): [] sysvec_call_function_single+0xa/0xb0 arch/x86/kernel/smp.c:262 softirqs last enabled at (0): [] rcu_lock_acquire include/linux/rcupdate.h:350 [inline] softirqs last enabled at (0): [] rcu_read_lock include/linux/rcupdate.h:791 [inline] softirqs last enabled at (0): [] copy_process+0x9e1/0x4060 kernel/fork.c:2132 softirqs last disabled at (0): [<0000000000000000>] 0x0 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(lock#10); lock(lock#10); *** DEADLOCK *** 2 locks held by syz-executor.2/5037: #0: ffffffff8d12acc0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline] #0: ffffffff8d12acc0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline] #0: ffffffff8d12acc0 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2272 [inline] #0: ffffffff8d12acc0 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x110/0x410 kernel/trace/bpf_trace.c:2312 #1: ffff888023a63d58 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:136 [inline] #1: ffff888023a63d58 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x232/0x9c0 kernel/bpf/stackmap.c:144 stack backtrace: CPU: 0 PID: 5037 Comm: syz-executor.2 Not tainted 6.1.93-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 valid_state+0x136/0x1c0 kernel/locking/lockdep.c:3969 mark_lock_irq+0xa8/0xba0 kernel/locking/lockdep.c:4172 mark_lock+0x21c/0x340 kernel/locking/lockdep.c:4628 mark_usage kernel/locking/lockdep.c:4520 [inline] __lock_acquire+0xb40/0x1f80 kernel/locking/lockdep.c:5003 lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_acquire_returned+0x9d/0x670 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+0x99e/0x9c0 kernel/bpf/stackmap.c:144 __bpf_get_stack+0x495/0x570 kernel/bpf/stackmap.c:452 ____bpf_get_stack_raw_tp kernel/trace/bpf_trace.c:1877 [inline] bpf_get_stack_raw_tp+0x1b2/0x220 kernel/trace/bpf_trace.c:1867 bpf_prog_ec3b2eefa702d8d3+0x3a/0x3e bpf_dispatcher_nop_func include/linux/bpf.h:989 [inline] __bpf_prog_run include/linux/filter.h:603 [inline] bpf_prog_run include/linux/filter.h:610 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2273 [inline] bpf_trace_run2+0x1fd/0x410 kernel/trace/bpf_trace.c:2312 trace_tlb_flush+0x151/0x1a0 include/trace/events/tlb.h:38 flush_tlb_func+0x4e3/0x620 arch/x86/mm/tlb.c:875 __flush_smp_call_function_queue+0x2d9/0xd00 kernel/smp.c:641 __sysvec_call_function_single+0xbb/0x360 arch/x86/kernel/smp.c:267 sysvec_call_function_single+0x89/0xb0 arch/x86/kernel/smp.c:262 asm_sysvec_call_function_single+0x16/0x20 arch/x86/include/asm/idtentry.h:661 RIP: 0010:finish_task_switch+0x1d3/0x810 kernel/sched/core.c:5124 Code: 2e 0b 00 48 83 c4 08 4c 89 f7 e8 98 30 00 00 0f 1f 44 00 00 4c 89 f7 e8 0b 32 36 09 e8 06 1e 32 00 fb 49 8d bc 24 f8 15 00 00 <48> 89 f8 48 c1 e8 03 49 bd 00 00 00 00 00 fc ff df 42 0f b6 04 28 RSP: 0018:ffffc9000476fed8 EFLAGS: 00000286 RAX: 26f41fd4b2aec500 RBX: ffff888020aa5974 RCX: ffffffff91c95103 RDX: dffffc0000000000 RSI: ffffffff8aec0240 RDI: ffff8880727eb3b8 RBP: ffffc9000476ff20 R08: dffffc0000000000 R09: ffffed1017307541 R10: 0000000000000000 R11: dffffc0000000001 R12: ffff8880727e9dc0 R13: 1ffff110173076eb R14: ffff8880b983aa00 R15: ffff8880b983b758 schedule_tail+0xb/0xb0 kernel/sched/core.c:5180 ret_from_fork+0x8/0x30 arch/x86/entry/entry_64.S:293 ---------------- Code disassembly (best guess): 0: 2e 0b 00 cs or (%rax),%eax 3: 48 83 c4 08 add $0x8,%rsp 7: 4c 89 f7 mov %r14,%rdi a: e8 98 30 00 00 call 0x30a7 f: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 14: 4c 89 f7 mov %r14,%rdi 17: e8 0b 32 36 09 call 0x9363227 1c: e8 06 1e 32 00 call 0x321e27 21: fb sti 22: 49 8d bc 24 f8 15 00 lea 0x15f8(%r12),%rdi 29: 00 * 2a: 48 89 f8 mov %rdi,%rax <-- trapping instruction 2d: 48 c1 e8 03 shr $0x3,%rax 31: 49 bd 00 00 00 00 00 movabs $0xdffffc0000000000,%r13 38: fc ff df 3b: 42 0f b6 04 28 movzbl (%rax,%r13,1),%eax