================================ WARNING: inconsistent lock state 6.10.0-syzkaller-04485-gfa5ef655615a #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz.1.1014/7778 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff8880b9438798 (lock#10){?.+.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b9438798 (lock#10){?.+.}-{2:2}, at: __mmap_lock_do_trace_acquire_returned+0x8f/0x630 mm/mmap_lock.c:237 {HARDIRQ-ON-W} state was registered at: lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5753 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_start_locking+0x9c/0x620 mm/mmap_lock.c:230 __mmap_lock_trace_start_locking include/linux/mmap_lock.h:29 [inline] mmap_write_lock_killable include/linux/mmap_lock.h:121 [inline] dup_mmap kernel/fork.c:634 [inline] dup_mm kernel/fork.c:1671 [inline] copy_mm+0x1e6d/0x1f30 kernel/fork.c:1720 copy_process+0x187a/0x3dc0 kernel/fork.c:2373 kernel_clone+0x226/0x8f0 kernel/fork.c:2780 __do_sys_clone kernel/fork.c:2923 [inline] __se_sys_clone kernel/fork.c:2907 [inline] __x64_sys_clone+0x258/0x2a0 kernel/fork.c:2907 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f irq event stamp: 4620 hardirqs last enabled at (4619): [] irqentry_exit+0x63/0x90 kernel/entry/common.c:357 hardirqs last disabled at (4620): [] sysvec_call_function_single+0xe/0xc0 arch/x86/kernel/smp.c:266 softirqs last enabled at (4510): [] local_bh_disable include/linux/bottom_half.h:20 [inline] softirqs last enabled at (4510): [] fpregs_lock arch/x86/include/asm/fpu/api.h:72 [inline] softirqs last enabled at (4510): [] fpu_clone+0x25b/0xad0 arch/x86/kernel/fpu/core.c:630 softirqs last disabled at (4508): [] local_bh_disable include/linux/bottom_half.h:20 [inline] softirqs last disabled at (4508): [] fpregs_lock arch/x86/include/asm/fpu/api.h:72 [inline] softirqs last disabled at (4508): [] fpu_clone+0x25b/0xad0 arch/x86/kernel/fpu/core.c:630 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.1.1014/7778: #0: ffffffff8e335fe0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:327 [inline] #0: ffffffff8e335fe0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:839 [inline] #0: ffffffff8e335fe0 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2405 [inline] #0: ffffffff8e335fe0 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1fc/0x540 kernel/trace/bpf_trace.c:2447 #1: ffff88802f624418 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:163 [inline] #1: ffff88802f624418 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x237/0x9d0 kernel/bpf/stackmap.c:141 stack backtrace: CPU: 0 PID: 7778 Comm: syz.1.1014 Not tainted 6.10.0-syzkaller-04485-gfa5ef655615a #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114 valid_state+0x13a/0x1c0 kernel/locking/lockdep.c:4012 mark_lock_irq+0xbb/0xc20 kernel/locking/lockdep.c:4215 mark_lock+0x223/0x350 kernel/locking/lockdep.c:4677 mark_usage kernel/locking/lockdep.c:4563 [inline] __lock_acquire+0xb8e/0x1fd0 kernel/locking/lockdep.c:5090 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5753 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_acquire_returned+0xa8/0x630 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+0x9af/0x9d0 kernel/bpf/stackmap.c:141 __bpf_get_stack+0x4ad/0x5a0 kernel/bpf/stackmap.c:449 ____bpf_get_stack_raw_tp kernel/trace/bpf_trace.c:1997 [inline] bpf_get_stack_raw_tp+0x1a3/0x240 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:682 [inline] bpf_prog_run include/linux/filter.h:698 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2406 [inline] bpf_trace_run2+0x47d/0x540 kernel/trace/bpf_trace.c:2447 trace_tlb_flush+0x118/0x140 include/trace/events/tlb.h:38 flush_tlb_func+0x4e7/0x630 arch/x86/mm/tlb.c:892 csd_do_func kernel/smp.c:134 [inline] __flush_smp_call_function_queue+0x3fc/0x1690 kernel/smp.c:512 __sysvec_call_function_single+0xb8/0x430 arch/x86/kernel/smp.c:271 instr_sysvec_call_function_single arch/x86/kernel/smp.c:266 [inline] sysvec_call_function_single+0x9e/0xc0 arch/x86/kernel/smp.c:266 asm_sysvec_call_function_single+0x1a/0x20 arch/x86/include/asm/idtentry.h:709 RIP: 0010:finish_task_switch+0x1ea/0x870 kernel/sched/core.c:5062 Code: c9 50 e8 19 b6 0b 00 48 83 c4 08 4c 89 f7 e8 7d 38 00 00 0f 1f 44 00 00 4c 89 f7 e8 a0 2a 30 0a e8 fb e7 36 00 fb 48 8b 5d c0 <48> 8d bb f8 15 00 00 48 89 f8 48 c1 e8 03 49 be 00 00 00 00 00 fc RSP: 0018:ffffc900158176e8 EFLAGS: 00000282 RAX: 36afa5badf99e000 RBX: ffff888029b79e00 RCX: ffffffff947c7703 RDX: dffffc0000000000 RSI: ffffffff8bcac920 RDI: ffffffff8c2045a0 RBP: ffffc90015817730 R08: ffffffff8fae37af R09: 1ffffffff1f5c6f5 R10: dffffc0000000000 R11: fffffbfff1f5c6f6 R12: 1ffff11017287ebb R13: dffffc0000000000 R14: ffff8880b943e840 R15: ffff8880b943f5d8 context_switch kernel/sched/core.c:5191 [inline] __schedule+0x1808/0x4a60 kernel/sched/core.c:6529 preempt_schedule_common+0x84/0xd0 kernel/sched/core.c:6708 preempt_schedule+0xe1/0xf0 kernel/sched/core.c:6732 preempt_schedule_thunk+0x1a/0x30 arch/x86/entry/thunk.S:12 class_preempt_destructor include/linux/preempt.h:480 [inline] try_to_wake_up+0x9a1/0x1470 kernel/sched/core.c:4174 wake_up_process kernel/sched/core.c:4299 [inline] wake_up_q+0xc8/0x120 kernel/sched/core.c:1029 futex_wake+0x523/0x5c0 kernel/futex/waitwake.c:199 do_futex+0x392/0x560 kernel/futex/syscalls.c:107 __do_sys_futex kernel/futex/syscalls.c:179 [inline] __se_sys_futex+0x3f9/0x480 kernel/futex/syscalls.c:160 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7efcb1575f19 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007efcb235e0f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: ffffffffffffffda RBX: 00007efcb1705f68 RCX: 00007efcb1575f19 RDX: 00000000000f4240 RSI: 0000000000000081 RDI: 00007efcb1705f6c RBP: 00007efcb1705f60 R08: 7fffffffffffffff R09: 00007efcb235e6c0 R10: 00000000000001f3 R11: 0000000000000246 R12: 00007efcb1705f6c R13: 000000000000000b R14: 00007ffe974d92c0 R15: 00007ffe974d93a8 ---------------- Code disassembly (best guess): 0: c9 leave 1: 50 push %rax 2: e8 19 b6 0b 00 call 0xbb620 7: 48 83 c4 08 add $0x8,%rsp b: 4c 89 f7 mov %r14,%rdi e: e8 7d 38 00 00 call 0x3890 13: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 18: 4c 89 f7 mov %r14,%rdi 1b: e8 a0 2a 30 0a call 0xa302ac0 20: e8 fb e7 36 00 call 0x36e820 25: fb sti 26: 48 8b 5d c0 mov -0x40(%rbp),%rbx * 2a: 48 8d bb f8 15 00 00 lea 0x15f8(%rbx),%rdi <-- trapping instruction 31: 48 89 f8 mov %rdi,%rax 34: 48 c1 e8 03 shr $0x3,%rax 38: 49 rex.WB 39: be 00 00 00 00 mov $0x0,%esi 3e: 00 fc add %bh,%ah