================================ WARNING: inconsistent lock state 6.10.0-rc2-syzkaller-00751-gdedf56d775c0 #0 Not tainted -------------------------------- inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage. syz-executor.4/5545 [HC0[0]:SC0[0]:HE1:SE1] takes: ffff8880b9538828 (lock#10){?...}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b9538828 (lock#10){?...}-{2:2}, at: __mmap_lock_do_trace_released+0x83/0x620 mm/mmap_lock.c:243 {IN-HARDIRQ-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_released+0x9c/0x620 mm/mmap_lock.c:243 __mmap_lock_trace_released include/linux/mmap_lock.h:42 [inline] mmap_read_unlock_non_owner include/linux/mmap_lock.h:176 [inline] do_mmap_read_unlock+0x5d/0x60 kernel/bpf/task_iter.c:1049 irq_work_single+0xe2/0x240 kernel/irq_work.c:221 irq_work_run_list kernel/irq_work.c:252 [inline] irq_work_run+0x18b/0x350 kernel/irq_work.c:261 __sysvec_irq_work+0xb8/0x430 arch/x86/kernel/irq_work.c:22 instr_sysvec_irq_work arch/x86/kernel/irq_work.c:17 [inline] sysvec_irq_work+0x9e/0xc0 arch/x86/kernel/irq_work.c:17 asm_sysvec_irq_work+0x1a/0x20 arch/x86/include/asm/idtentry.h:738 __text_poke+0xa4a/0xd30 text_poke arch/x86/kernel/alternative.c:1968 [inline] text_poke_bp_batch+0x265/0xb30 arch/x86/kernel/alternative.c:2276 text_poke_flush arch/x86/kernel/alternative.c:2470 [inline] text_poke_finish+0x30/0x50 arch/x86/kernel/alternative.c:2477 arch_jump_label_transform_apply+0x1c/0x30 arch/x86/kernel/jump_label.c:146 static_key_enable_cpuslocked+0x136/0x260 kernel/jump_label.c:205 static_key_enable+0x1a/0x20 kernel/jump_label.c:218 tracepoint_add_func+0x953/0x9e0 kernel/tracepoint.c:361 tracepoint_probe_register_prio kernel/tracepoint.c:511 [inline] tracepoint_probe_register+0x105/0x160 kernel/tracepoint.c:531 perf_trace_event_reg kernel/trace/trace_event_perf.c:129 [inline] perf_trace_event_init+0x478/0x930 kernel/trace/trace_event_perf.c:202 perf_trace_init+0x243/0x2e0 kernel/trace/trace_event_perf.c:226 perf_tp_event_init+0x8d/0x110 kernel/events/core.c:10210 perf_try_init_event+0x139/0x3f0 kernel/events/core.c:11685 perf_init_event kernel/events/core.c:11755 [inline] perf_event_alloc+0x1018/0x20a0 kernel/events/core.c:12033 __do_sys_perf_event_open kernel/events/core.c:12540 [inline] __se_sys_perf_event_open+0xb43/0x38d0 kernel/events/core.c:12431 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 irq event stamp: 3119 hardirqs last enabled at (3119): [] do_user_addr_fault arch/x86/mm/fault.c:1283 [inline] hardirqs last enabled at (3119): [] handle_page_fault arch/x86/mm/fault.c:1481 [inline] hardirqs last enabled at (3119): [] exc_page_fault+0x113/0x8c0 arch/x86/mm/fault.c:1539 hardirqs last disabled at (3118): [] exc_page_fault+0x57/0x8c0 arch/x86/mm/fault.c:1536 softirqs last enabled at (1930): [] __do_softirq kernel/softirq.c:588 [inline] softirqs last enabled at (1930): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last enabled at (1930): [] __irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637 softirqs last disabled at (1745): [] __do_softirq kernel/softirq.c:588 [inline] softirqs last disabled at (1745): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last disabled at (1745): [] __irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637 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-executor.4/5545: #0: ffff88807c788b18 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:163 [inline] #0: ffff88807c788b18 (&mm->mmap_lock){++++}-{3:3}, at: get_mmap_lock_carefully mm/memory.c:5715 [inline] #0: ffff88807c788b18 (&mm->mmap_lock){++++}-{3:3}, at: lock_mm_and_find_vma+0x32/0x2f0 mm/memory.c:5775 stack backtrace: CPU: 1 PID: 5545 Comm: syz-executor.4 Not tainted 6.10.0-rc2-syzkaller-00751-gdedf56d775c0 #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+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:4587 [inline] __lock_acquire+0x112d/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_released+0x9c/0x620 mm/mmap_lock.c:243 __mmap_lock_trace_released include/linux/mmap_lock.h:42 [inline] mmap_read_unlock+0x33/0x40 include/linux/mmap_lock.h:170 lock_mm_and_find_vma+0xf8/0x2f0 mm/memory.c:5787 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 RIP: 0010:__put_user_4+0x11/0x20 arch/x86/lib/putuser.S:88 Code: 1f 84 00 00 00 00 00 66 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 48 89 cb 48 c1 fb 3f 48 09 d9 0f 01 cb <89> 01 31 c9 0f 01 ca c3 cc cc cc cc 0f 1f 00 90 90 90 90 90 90 90 RSP: 0018:ffffc90013f97dd8 EFLAGS: 00050246 RAX: 0000000000000006 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffffffff8bcacd00 RDI: ffffffff8c1ff740 RBP: ffffc90013f97ed0 R08: ffffffff8fad686f R09: 1ffffffff1f5ad0d R10: dffffc0000000000 R11: fffffbfff1f5ad0e R12: 0000000000000000 R13: 1ffff920027f2fc4 R14: 1ffff920027f2fcc R15: 0000000000000000 __sys_socketpair+0x186/0x720 net/socket.c:1756 __do_sys_socketpair net/socket.c:1822 [inline] __se_sys_socketpair net/socket.c:1819 [inline] __x64_sys_socketpair+0x9b/0xb0 net/socket.c:1819 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:0x7f856427cea9 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:00007f8564fc30c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000035 RAX: ffffffffffffffda RBX: 00007f85643b3f80 RCX: 00007f856427cea9 RDX: 0000000000000000 RSI: 0000000000000005 RDI: 0000000000000001 RBP: 00007f85642ebff4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f85643b3f80 R15: 00007ffcd80cf1b8 ---------------- Code disassembly (best guess), 1 bytes skipped: 0: 84 00 test %al,(%rax) 2: 00 00 add %al,(%rax) 4: 00 00 add %al,(%rax) 6: 66 90 xchg %ax,%ax 8: 90 nop 9: 90 nop a: 90 nop b: 90 nop c: 90 nop d: 90 nop e: 90 nop f: 90 nop 10: 90 nop 11: 90 nop 12: 90 nop 13: 90 nop 14: 90 nop 15: 90 nop 16: 90 nop 17: 90 nop 18: f3 0f 1e fa endbr64 1c: 48 89 cb mov %rcx,%rbx 1f: 48 c1 fb 3f sar $0x3f,%rbx 23: 48 09 d9 or %rbx,%rcx 26: 0f 01 cb stac * 29: 89 01 mov %eax,(%rcx) <-- trapping instruction 2b: 31 c9 xor %ecx,%ecx 2d: 0f 01 ca clac 30: c3 ret 31: cc int3 32: cc int3 33: cc int3 34: cc int3 35: 0f 1f 00 nopl (%rax) 38: 90 nop 39: 90 nop 3a: 90 nop 3b: 90 nop 3c: 90 nop 3d: 90 nop 3e: 90 nop