================================ WARNING: inconsistent lock state 6.10.0-rc6-syzkaller-00212-g1dd28064d416 #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz.0.2091/10938 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff88802c238a80 (lock#14){?.+.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff88802c238a80 (lock#14){?.+.}-{2:2}, at: __mmap_lock_do_trace_acquire_returned+0x7f/0x790 mm/mmap_lock.c:237 {HARDIRQ-ON-W} state was registered at: lock_acquire kernel/locking/lockdep.c:5754 [inline] lock_acquire+0x1b1/0x560 kernel/locking/lockdep.c:5719 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_acquire_returned+0x97/0x790 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:123 [inline] dup_mmap kernel/fork.c:638 [inline] dup_mm kernel/fork.c:1688 [inline] copy_mm+0xddc/0x2680 kernel/fork.c:1737 copy_process+0x3ea8/0x6f50 kernel/fork.c:2390 kernel_clone+0xfd/0x980 kernel/fork.c:2797 __do_compat_sys_ia32_clone+0xb7/0x100 arch/x86/kernel/sys_ia32.c:254 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0x73/0x120 arch/x86/entry/common.c:386 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411 entry_SYSENTER_compat_after_hwframe+0x84/0x8e irq event stamp: 14 hardirqs last enabled at (13): [] asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 hardirqs last disabled at (14): [] irqentry_enter+0x54/0x60 kernel/entry/common.c:243 softirqs last enabled at (0): [] copy_process+0x1ee0/0x6f50 kernel/fork.c:2336 softirqs last disabled at (0): [<0000000000000000>] 0x0 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(lock#14); lock(lock#14); *** DEADLOCK *** 2 locks held by syz.0.2091/10938: #0: ffffffff8dbb4ea0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #0: ffffffff8dbb4ea0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #0: ffffffff8dbb4ea0 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2402 [inline] #0: ffffffff8dbb4ea0 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1c2/0x590 kernel/trace/bpf_trace.c:2444 #1: ffff88805223cd98 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:163 [inline] #1: ffff88805223cd98 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x28a/0x760 kernel/bpf/stackmap.c:141 stack backtrace: CPU: 2 PID: 10938 Comm: syz.0.2091 Not tainted 6.10.0-rc6-syzkaller-00212-g1dd28064d416 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114 print_usage_bug kernel/locking/lockdep.c:3971 [inline] valid_state kernel/locking/lockdep.c:4013 [inline] mark_lock_irq kernel/locking/lockdep.c:4216 [inline] mark_lock+0x923/0xc60 kernel/locking/lockdep.c:4678 mark_usage kernel/locking/lockdep.c:4564 [inline] __lock_acquire+0x1359/0x3b30 kernel/locking/lockdep.c:5091 lock_acquire kernel/locking/lockdep.c:5754 [inline] lock_acquire+0x1b1/0x560 kernel/locking/lockdep.c:5719 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_acquire_returned+0x97/0x790 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+0x602/0x760 kernel/bpf/stackmap.c:141 __bpf_get_stack+0x68a/0x710 kernel/bpf/stackmap.c:449 ____bpf_get_stack_raw_tp kernel/trace/bpf_trace.c:1994 [inline] bpf_get_stack_raw_tp+0x124/0x160 kernel/trace/bpf_trace.c:1984 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:2403 [inline] bpf_trace_run2+0x231/0x590 kernel/trace/bpf_trace.c:2444 trace_tlb_flush+0xf3/0x170 include/trace/events/tlb.h:38 csd_do_func kernel/smp.c:133 [inline] __flush_smp_call_function_queue+0x27a/0x8c0 kernel/smp.c:511 __sysvec_call_function_single+0x8c/0x410 arch/x86/kernel/smp.c:271 instr_sysvec_call_function_single arch/x86/kernel/smp.c:266 [inline] sysvec_call_function_single+0x43/0xb0 arch/x86/kernel/smp.c:266 asm_sysvec_call_function_single+0x1a/0x20 arch/x86/include/asm/idtentry.h:709 RIP: 0023:0xf7229140 Code: 00 c3 8d b4 26 00 00 00 00 90 e8 2b 67 f4 ff 05 cf 0e 1d 00 c7 c0 d8 ff ff ff 65 03 05 00 00 00 00 c3 8d b4 26 00 00 00 00 90 0b 67 f4 ff 05 af 0e 1d 00 53 c7 c2 ec fe ff ff c7 c3 e0 ff ff RSP: 002b:00000000f5d2768c EFLAGS: 00010246 RAX: 00000000ffffff20 RBX: 00000000f73f9ff4 RCX: 0000000000000058 RDX: 00000000f5d27db4 RSI: 00000000f5d27b40 RDI: 00000000f73f9ff4 RBP: 00000000f5d276e8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 ---------------- Code disassembly (best guess): 0: 00 c3 add %al,%bl 2: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi 9: 90 nop a: e8 2b 67 f4 ff call 0xfff4673a f: 05 cf 0e 1d 00 add $0x1d0ecf,%eax 14: c7 c0 d8 ff ff ff mov $0xffffffd8,%eax 1a: 65 03 05 00 00 00 00 add %gs:0x0(%rip),%eax # 0x21 21: c3 ret 22: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi 29: 90 nop * 2a: e8 0b 67 f4 ff call 0xfff4673a <-- trapping instruction 2f: 05 af 0e 1d 00 add $0x1d0eaf,%eax 34: 53 push %rbx 35: c7 c2 ec fe ff ff mov $0xfffffeec,%edx 3b: c7 .byte 0xc7 3c: c3 ret 3d: e0 ff loopne 0x3e 3f: ff .byte 0xff