================================ WARNING: inconsistent lock state 6.10.0-syzkaller-04485-gfa5ef655615a #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz.0.617/7160 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff8880b9538798 (lock#10){?.+.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b9538798 (lock#10){?.+.}-{2:2}, at: __mmap_lock_do_trace_start_locking+0x83/0x620 mm/mmap_lock.c:230 {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_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] get_mmap_lock_carefully mm/memory.c:5716 [inline] lock_mm_and_find_vma+0x213/0x2f0 mm/memory.c:5776 do_user_addr_fault arch/x86/mm/fault.c:1361 [inline] handle_page_fault arch/x86/mm/fault.c:1481 [inline] exc_page_fault+0x1bf/0x8c0 arch/x86/mm/fault.c:1539 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 __put_user_4+0x11/0x20 arch/x86/lib/putuser.S:86 schedule_tail+0x96/0xb0 kernel/sched/core.c:5123 ret_from_fork+0x24/0x80 arch/x86/kernel/process.c:143 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 irq event stamp: 4354 hardirqs last enabled at (4353): [] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:151 [inline] hardirqs last enabled at (4353): [] _raw_spin_unlock_irqrestore+0x8f/0x140 kernel/locking/spinlock.c:194 hardirqs last disabled at (4354): [] sysvec_call_function_single+0xe/0xc0 arch/x86/kernel/smp.c:266 softirqs last enabled at (4300): [] local_bh_disable include/linux/bottom_half.h:20 [inline] softirqs last enabled at (4300): [] fpregs_lock arch/x86/include/asm/fpu/api.h:72 [inline] softirqs last enabled at (4300): [] fpu_clone+0x25b/0xad0 arch/x86/kernel/fpu/core.c:630 softirqs last disabled at (4298): [] local_bh_disable include/linux/bottom_half.h:20 [inline] softirqs last disabled at (4298): [] fpregs_lock arch/x86/include/asm/fpu/api.h:72 [inline] softirqs last disabled at (4298): [] 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 *** 1 lock held by syz.0.617/7160: #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 stack backtrace: CPU: 1 PID: 7160 Comm: syz.0.617 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_start_locking+0x9c/0x620 mm/mmap_lock.c:230 __mmap_lock_trace_start_locking include/linux/mmap_lock.h:29 [inline] mmap_read_trylock include/linux/mmap_lock.h:162 [inline] stack_map_get_build_id_offset+0x98a/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_e6cf5f9c69743609+0x42/0x46 bpf_dispatcher_nop_func include/linux/bpf.h:1243 [inline] __bpf_prog_run include/linux/filter.h:691 [inline] bpf_prog_run include/linux/filter.h:698 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2406 [inline] bpf_trace_run2+0x2ec/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:__sanitizer_cov_trace_pc+0x5d/0x70 kernel/kcov.c:225 Code: f8 15 00 00 83 fa 02 75 21 48 8b 91 00 16 00 00 48 8b 32 48 8d 7e 01 8b 89 fc 15 00 00 48 39 cf 73 08 48 89 3a 48 89 44 f2 08 cc cc cc cc 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 90 90 90 RSP: 0018:ffffc9001604f440 EFLAGS: 00000283 RAX: ffffffff81413e35 RBX: ffffc9001604f580 RCX: 0000000000040000 RDX: ffffc90004b71000 RSI: 00000000000395cc RDI: 00000000000395cd RBP: ffffc9001604ff00 R08: ffffffff81413e0b R09: ffffffff8141297f R10: 0000000000000003 R11: ffff8880205c8000 R12: 1ffff92002c09eb1 R13: 1ffff92002c09eb2 R14: 1ffff92002c09eb0 R15: ffffc90016050000 stack_access_ok arch/x86/kernel/unwind_orc.c:393 [inline] deref_stack_reg+0xd5/0x260 arch/x86/kernel/unwind_orc.c:403 unwind_next_frame+0x1ab8/0x2a00 arch/x86/kernel/unwind_orc.c:648 arch_stack_walk+0x151/0x1b0 arch/x86/kernel/stacktrace.c:25 stack_trace_save+0x118/0x1d0 kernel/stacktrace.c:122 kasan_save_stack+0x3f/0x60 mm/kasan/common.c:47 __kasan_record_aux_stack+0xac/0xc0 mm/kasan/generic.c:541 __call_rcu_common kernel/rcu/tree.c:3106 [inline] call_rcu+0x167/0xa70 kernel/rcu/tree.c:3210 copy_process+0x2848/0x3dc0 kernel/fork.c:2620 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 RIP: 0033:0x7f1c26775f19 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:00007f1c274e9ff8 EFLAGS: 00000206 ORIG_RAX: 0000000000000038 RAX: ffffffffffffffda RBX: 00007f1c26905f60 RCX: 00007f1c26775f19 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000004001000 RBP: 00007f1c267e4e68 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000 R13: 000000000000004d R14: 00007f1c26905f60 R15: 00007ffe4f9eabc8 ---------------- Code disassembly (best guess): 0: f8 clc 1: 15 00 00 83 fa adc $0xfa830000,%eax 6: 02 75 21 add 0x21(%rbp),%dh 9: 48 8b 91 00 16 00 00 mov 0x1600(%rcx),%rdx 10: 48 8b 32 mov (%rdx),%rsi 13: 48 8d 7e 01 lea 0x1(%rsi),%rdi 17: 8b 89 fc 15 00 00 mov 0x15fc(%rcx),%ecx 1d: 48 39 cf cmp %rcx,%rdi 20: 73 08 jae 0x2a 22: 48 89 3a mov %rdi,(%rdx) 25: 48 89 44 f2 08 mov %rax,0x8(%rdx,%rsi,8) * 2a: c3 ret <-- trapping instruction 2b: cc int3 2c: cc int3 2d: cc int3 2e: cc int3 2f: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 36: 00 00 00 39: 0f 1f 40 00 nopl 0x0(%rax) 3d: 90 nop 3e: 90 nop 3f: 90 nop