================================ WARNING: inconsistent lock state 6.9.0-rc7-syzkaller-01844-gcddd2dc6390b #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz-executor.3/5214 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff8880b95387e8 (lock#10){?.+.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b95387e8 (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:5754 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_lock include/linux/mmap_lock.h:147 [inline] process_vm_rw_single_vec mm/process_vm_access.c:105 [inline] process_vm_rw_core mm/process_vm_access.c:216 [inline] process_vm_rw+0xa46/0xcf0 mm/process_vm_access.c:284 __do_sys_process_vm_readv mm/process_vm_access.c:296 [inline] __se_sys_process_vm_readv mm/process_vm_access.c:292 [inline] __x64_sys_process_vm_readv+0xe0/0x100 mm/process_vm_access.c:292 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f irq event stamp: 28 hardirqs last enabled at (27): [] seqcount_lockdep_reader_access+0x13b/0x1e0 include/linux/seqlock.h:74 hardirqs last disabled at (28): [] sysvec_call_function_single+0xe/0xc0 arch/x86/kernel/smp.c:266 softirqs last enabled at (0): [] rcu_lock_acquire include/linux/rcupdate.h:329 [inline] softirqs last enabled at (0): [] rcu_read_lock include/linux/rcupdate.h:781 [inline] softirqs last enabled at (0): [] copy_process+0xa03/0x3df0 kernel/fork.c:2259 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.3/5214: #0: ffffffff8e334ea0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #0: ffffffff8e334ea0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #0: ffffffff8e334ea0 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2391 [inline] #0: ffffffff8e334ea0 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1fc/0x540 kernel/trace/bpf_trace.c:2433 #1: ffff888066a49e20 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:165 [inline] #1: ffff888066a49e20 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x237/0x9d0 kernel/bpf/stackmap.c:141 stack backtrace: CPU: 1 PID: 5214 Comm: syz-executor.3 Not tainted 6.9.0-rc7-syzkaller-01844-gcddd2dc6390b #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+0x241/0x360 lib/dump_stack.c:114 valid_state+0x13a/0x1c0 kernel/locking/lockdep.c:4013 mark_lock_irq+0xbb/0xc20 kernel/locking/lockdep.c:4216 mark_lock+0x223/0x350 kernel/locking/lockdep.c:4678 mark_usage kernel/locking/lockdep.c:4564 [inline] __lock_acquire+0xb8e/0x1fd0 kernel/locking/lockdep.c:5091 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754 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:166 [inline] stack_map_get_build_id_offset+0x9b2/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:1983 [inline] bpf_get_stack_raw_tp+0x1a3/0x240 kernel/trace/bpf_trace.c:1973 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:2392 [inline] bpf_trace_run2+0x2ec/0x540 kernel/trace/bpf_trace.c:2433 __traceiter_tlb_flush+0x77/0xd0 include/trace/events/tlb.h:38 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:133 [inline] __flush_smp_call_function_queue+0x3fc/0x1690 kernel/smp.c:511 __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:check_kcov_mode kernel/kcov.c:184 [inline] RIP: 0010:__sanitizer_cov_trace_pc+0x37/0x70 kernel/kcov.c:207 Code: c0 d3 03 00 65 8b 15 70 b1 6d 7e f7 c2 00 01 ff 00 74 11 f7 c2 00 01 00 00 74 35 83 b9 14 16 00 00 00 74 2c 8b 91 f0 15 00 00 <83> fa 02 75 21 48 8b 91 f8 15 00 00 48 8b 32 48 8d 7e 01 8b 89 f4 RSP: 0018:ffffc90003d16d20 EFLAGS: 00000246 RAX: ffffffff814145ec RBX: 0000000000000000 RCX: ffff88801837da00 RDX: 0000000000000000 RSI: ffffffff81ee674f RDI: ffffffff81ee3348 RBP: 1ffff920007a2dc0 R08: ffffffff81414480 R09: ffffc90003d16ef0 R10: 0000000000000003 R11: ffffffff81820180 R12: ffffffff8fc12fd4 R13: dffffc0000000000 R14: 1ffff920007a2dc0 R15: ffffffff9036d5fe unwind_next_frame+0x67c/0x2a00 arch/x86/kernel/unwind_orc.c:495 arch_stack_walk+0x151/0x1b0 arch/x86/kernel/stacktrace.c:25 ---------------- Code disassembly (best guess): 0: c0 d3 03 rcl $0x3,%bl 3: 00 65 8b add %ah,-0x75(%rbp) 6: 15 70 b1 6d 7e adc $0x7e6db170,%eax b: f7 c2 00 01 ff 00 test $0xff0100,%edx 11: 74 11 je 0x24 13: f7 c2 00 01 00 00 test $0x100,%edx 19: 74 35 je 0x50 1b: 83 b9 14 16 00 00 00 cmpl $0x0,0x1614(%rcx) 22: 74 2c je 0x50 24: 8b 91 f0 15 00 00 mov 0x15f0(%rcx),%edx * 2a: 83 fa 02 cmp $0x2,%edx <-- trapping instruction 2d: 75 21 jne 0x50 2f: 48 8b 91 f8 15 00 00 mov 0x15f8(%rcx),%rdx 36: 48 8b 32 mov (%rdx),%rsi 39: 48 8d 7e 01 lea 0x1(%rsi),%rdi 3d: 8b .byte 0x8b 3e: 89 f4 mov %esi,%esp