================================ WARNING: inconsistent lock state 6.10.0-syzkaller-00017-g5e0497553643 #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz.0.8667/1872 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff88802c338a80 (lock#14){?.+.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff88802c338a80 (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_read_trylock include/linux/mmap_lock.h:164 [inline] vmf_anon_prepare+0x194/0x250 mm/memory.c:3234 do_anonymous_page mm/memory.c:4451 [inline] do_pte_missing mm/memory.c:3895 [inline] handle_pte_fault mm/memory.c:5381 [inline] __handle_mm_fault+0x28ab/0x52a0 mm/memory.c:5524 handle_mm_fault+0x476/0xa00 mm/memory.c:5689 do_user_addr_fault+0x426/0xe50 arch/x86/mm/fault.c:1338 handle_page_fault arch/x86/mm/fault.c:1481 [inline] exc_page_fault+0x5c/0xc0 arch/x86/mm/fault.c:1539 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 irq event stamp: 2898 hardirqs last enabled at (2897): [] do_user_addr_fault+0x192/0xe50 arch/x86/mm/fault.c:1283 hardirqs last disabled at (2898): [] sysvec_call_function_single+0xe/0xb0 arch/x86/kernel/smp.c:266 softirqs last enabled at (2630): [] softirq_handle_end kernel/softirq.c:400 [inline] softirqs last enabled at (2630): [] handle_softirqs+0x5be/0x8f0 kernel/softirq.c:582 softirqs last disabled at (2597): [] __do_softirq kernel/softirq.c:588 [inline] softirqs last disabled at (2597): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last disabled at (2597): [] __irq_exit_rcu kernel/softirq.c:637 [inline] softirqs last disabled at (2597): [] irq_exit_rcu+0xbb/0x120 kernel/softirq.c:649 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(lock#14); lock(lock#14); *** DEADLOCK *** 4 locks held by syz.0.8667/1872: #0: ffffffff8dbb5020 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #0: ffffffff8dbb5020 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #0: ffffffff8dbb5020 (rcu_read_lock){....}-{1:2}, at: lock_vma_under_rcu+0xe3/0x8f0 mm/memory.c:5839 #1: ffff888021176ec8 (&vma->vm_lock->lock){++++}-{3:3}, at: vma_start_read include/linux/mm.h:683 [inline] #1: ffff888021176ec8 (&vma->vm_lock->lock){++++}-{3:3}, at: lock_vma_under_rcu+0x1e2/0x8f0 mm/memory.c:5845 #2: ffffffff8dbb5020 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #2: ffffffff8dbb5020 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #2: ffffffff8dbb5020 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2402 [inline] #2: ffffffff8dbb5020 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1c2/0x590 kernel/trace/bpf_trace.c:2444 #3: ffff8880297ecd98 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:163 [inline] #3: ffff8880297ecd98 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x28a/0x760 kernel/bpf/stackmap.c:141 stack backtrace: CPU: 3 PID: 1872 Comm: syz.0.8667 Not tainted 6.10.0-syzkaller-00017-g5e0497553643 #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 __traceiter_tlb_flush+0x64/0xb0 include/trace/events/tlb.h:38 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+0x90/0xb0 arch/x86/kernel/smp.c:266 asm_sysvec_call_function_single+0x1a/0x20 arch/x86/include/asm/idtentry.h:709 RIP: 0010:lock_acquire+0x1f2/0x560 kernel/locking/lockdep.c:5722 Code: c1 05 ca c5 95 7e 83 f8 01 0f 85 ea 02 00 00 9c 58 f6 c4 02 0f 85 d5 02 00 00 48 85 ed 74 01 fb 48 b8 00 00 00 00 00 fc ff df <48> 01 c3 48 c7 03 00 00 00 00 48 c7 43 08 00 00 00 00 48 8b 84 24 RSP: 0000:ffffc9000cc37c68 EFLAGS: 00000206 RAX: dffffc0000000000 RBX: 1ffff92001986f8f RCX: 00000000c5f18342 RDX: 0000000000000001 RSI: ffffffff8b2cbce0 RDI: ffffffff8b8ff8e0 RBP: 0000000000000200 R08: 0000000000000000 R09: fffffbfff283f46d R10: ffffffff941fa36f R11: 0000000000000001 R12: 0000000000000001 R13: 0000000000000001 R14: ffff888021176ec8 R15: 0000000000000000 down_read_trylock kernel/locking/rwsem.c:1568 [inline] down_read_trylock+0x1ed/0x3f0 kernel/locking/rwsem.c:1563 vma_start_read include/linux/mm.h:683 [inline] lock_vma_under_rcu+0x1e2/0x8f0 mm/memory.c:5845 do_user_addr_fault+0x3d7/0xe50 arch/x86/mm/fault.c:1329 handle_page_fault arch/x86/mm/fault.c:1481 [inline] exc_page_fault+0x5c/0xc0 arch/x86/mm/fault.c:1539 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 RIP: 0023:0xf71b1d31 Code: ff 00 00 00 00 e9 6e f7 ff ff 8d b4 26 00 00 00 00 8b 85 ac fe ff ff 80 b8 cf c5 b6 00 00 74 51 8b 85 98 fe ff ff c6 42 f8 01 42 10 00 89 42 f4 8b 71 5c 85 f6 0f 84 91 0c 00 00 8b 59 68 85 RSP: 002b:00000000ffb6be70 EFLAGS: 00010202 RAX: 0000000000000001 RBX: 0000000000000004 RCX: 00000000f748cff8 RDX: 00000000f748cff8 RSI: 0000000000000001 RDI: 00000000f748cfec RBP: 00000000ffb6c118 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 ---------------- Code disassembly (best guess): 0: c1 05 ca c5 95 7e 83 roll $0x83,0x7e95c5ca(%rip) # 0x7e95c5d1 7: f8 clc 8: 01 0f add %ecx,(%rdi) a: 85 ea test %ebp,%edx c: 02 00 add (%rax),%al e: 00 9c 58 f6 c4 02 0f add %bl,0xf02c4f6(%rax,%rbx,2) 15: 85 d5 test %edx,%ebp 17: 02 00 add (%rax),%al 19: 00 48 85 add %cl,-0x7b(%rax) 1c: ed in (%dx),%eax 1d: 74 01 je 0x20 1f: fb sti 20: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 27: fc ff df * 2a: 48 01 c3 add %rax,%rbx <-- trapping instruction 2d: 48 c7 03 00 00 00 00 movq $0x0,(%rbx) 34: 48 c7 43 08 00 00 00 movq $0x0,0x8(%rbx) 3b: 00 3c: 48 rex.W 3d: 8b .byte 0x8b 3e: 84 .byte 0x84 3f: 24 .byte 0x24