================================ WARNING: inconsistent lock state 6.1.94-syzkaller #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz-executor.3/5201 [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: 9716 hardirqs last enabled at (9715): [] asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:653 hardirqs last disabled at (9716): [] sysvec_call_function_single+0xa/0xb0 arch/x86/kernel/smp.c:262 softirqs last enabled at (8206): [] __do_softirq kernel/softirq.c:605 [inline] softirqs last enabled at (8206): [] invoke_softirq kernel/softirq.c:445 [inline] softirqs last enabled at (8206): [] __irq_exit_rcu+0x157/0x240 kernel/softirq.c:654 softirqs last disabled at (8171): [] __do_softirq kernel/softirq.c:605 [inline] softirqs last disabled at (8171): [] invoke_softirq kernel/softirq.c:445 [inline] softirqs last disabled at (8171): [] __irq_exit_rcu+0x157/0x240 kernel/softirq.c:654 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/5201: #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: ffff888012469f58 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:136 [inline] #1: ffff888012469f58 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x232/0x9c0 kernel/bpf/stackmap.c:144 stack backtrace: CPU: 0 PID: 5201 Comm: syz-executor.3 Not tainted 6.1.94-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:clear_page_erms+0x7/0x10 arch/x86/lib/clear_page_64.S:50 Code: 48 89 47 18 48 89 47 20 48 89 47 28 48 89 47 30 48 89 47 38 48 8d 7f 40 75 d9 90 c3 0f 1f 80 00 00 00 00 b9 00 10 00 00 31 c0 aa c3 66 0f 1f 44 00 00 89 c8 48 c1 e9 03 74 18 0f 1f 84 00 00 RSP: 0018:ffffc9000350f340 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000003 RCX: 0000000000000f80 RDX: ffff8880220f5000 RSI: 0000000000000003 RDI: ffff8880220f5080 RBP: 0000000000000008 R08: dffffc0000000000 R09: ffffed100441e000 R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000001 R13: 0000000000000000 R14: ffffea0000883c00 R15: 00000000005428c0 clear_page arch/x86/include/asm/page_64.h:57 [inline] clear_highpage include/linux/highmem.h:242 [inline] clear_highpage_kasan_tagged include/linux/highmem.h:252 [inline] kernel_init_pages mm/page_alloc.c:1377 [inline] post_alloc_hook+0x145/0x1b0 mm/page_alloc.c:2508 prep_new_page mm/page_alloc.c:2520 [inline] get_page_from_freelist+0x31a1/0x3320 mm/page_alloc.c:4279 __alloc_pages+0x28d/0x770 mm/page_alloc.c:5547 alloc_skb_with_frags+0x1c0/0x740 net/core/skbuff.c:6179 sock_alloc_send_pskb+0x915/0xa50 net/core/sock.c:2747 unix_stream_sendmsg+0x4b4/0x1070 net/unix/af_unix.c:2213 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg net/socket.c:730 [inline] ____sys_sendmsg+0x5a5/0x8f0 net/socket.c:2514 ___sys_sendmsg net/socket.c:2568 [inline] __sys_sendmsg+0x2a9/0x390 net/socket.c:2597 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f5d5747cf29 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f5d582d70c8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f5d575b3f80 RCX: 00007f5d5747cf29 RDX: 0000000000000000 RSI: 0000000020001580 RDI: 0000000000000008 RBP: 00007f5d574ec074 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f5d575b3f80 R15: 00007ffde52a3278 ---------------- Code disassembly (best guess): 0: 48 89 47 18 mov %rax,0x18(%rdi) 4: 48 89 47 20 mov %rax,0x20(%rdi) 8: 48 89 47 28 mov %rax,0x28(%rdi) c: 48 89 47 30 mov %rax,0x30(%rdi) 10: 48 89 47 38 mov %rax,0x38(%rdi) 14: 48 8d 7f 40 lea 0x40(%rdi),%rdi 18: 75 d9 jne 0xfffffff3 1a: 90 nop 1b: c3 ret 1c: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 23: b9 00 10 00 00 mov $0x1000,%ecx 28: 31 c0 xor %eax,%eax * 2a: f3 aa rep stos %al,%es:(%rdi) <-- trapping instruction 2c: c3 ret 2d: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 33: 89 c8 mov %ecx,%eax 35: 48 c1 e9 03 shr $0x3,%rcx 39: 74 18 je 0x53 3b: 0f .byte 0xf 3c: 1f (bad) 3d: 84 00 test %al,(%rax)