================================ WARNING: inconsistent lock state 6.9.0-syzkaller-12123-g531876c80004 #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz-executor.2/6521 [HC1[1]:SC0[0]:HE0: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 {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_released+0x9c/0x620 mm/mmap_lock.c:243 __mmap_lock_trace_released include/linux/mmap_lock.h:42 [inline] mmap_write_unlock include/linux/mmap_lock.h:129 [inline] dup_mmap kernel/fork.c:776 [inline] dup_mm kernel/fork.c:1688 [inline] copy_mm+0x1fe2/0x2020 kernel/fork.c:1737 copy_process+0x187a/0x3dc0 kernel/fork.c:2390 kernel_clone+0x226/0x8f0 kernel/fork.c:2797 __do_sys_clone kernel/fork.c:2940 [inline] __se_sys_clone kernel/fork.c:2924 [inline] __x64_sys_clone+0x258/0x2a0 kernel/fork.c:2924 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: 616 hardirqs last enabled at (615): [] __text_poke+0x9bf/0xd30 arch/x86/kernel/alternative.c:1943 hardirqs last disabled at (616): [] sysvec_irq_work+0xe/0xc0 arch/x86/kernel/irq_work.c:17 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/0x3dc0 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 *** 8 locks held by syz-executor.2/6521: #0: ffffffff947f2e50 (&pmus_srcu){.+.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:116 [inline] #0: ffffffff947f2e50 (&pmus_srcu){.+.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:215 [inline] #0: ffffffff947f2e50 (&pmus_srcu){.+.+}-{0:0}, at: perf_init_event kernel/events/core.c:11715 [inline] #0: ffffffff947f2e50 (&pmus_srcu){.+.+}-{0:0}, at: perf_event_alloc+0xc7d/0x20a0 kernel/events/core.c:12033 #1: ffffffff8e38ea68 (event_mutex){+.+.}-{3:3}, at: perf_trace_init+0x53/0x2e0 kernel/trace/trace_event_perf.c:221 #2: ffffffff8e3808a8 (tracepoints_mutex){+.+.}-{3:3}, at: tracepoint_probe_register_prio kernel/tracepoint.c:507 [inline] #2: ffffffff8e3808a8 (tracepoints_mutex){+.+.}-{3:3}, at: tracepoint_probe_register+0xb6/0x160 kernel/tracepoint.c:531 #3: ffffffff8e1ce470 (cpu_hotplug_lock){++++}-{0:0}, at: static_key_enable+0x12/0x20 kernel/jump_label.c:217 #4: ffffffff8e3e1928 (jump_label_mutex){+.+.}-{3:3}, at: jump_label_lock kernel/jump_label.c:27 [inline] #4: ffffffff8e3e1928 (jump_label_mutex){+.+.}-{3:3}, at: static_key_enable_cpuslocked+0xd7/0x260 kernel/jump_label.c:202 #5: ffffffff8e1e3548 (text_mutex){+.+.}-{3:3}, at: arch_jump_label_transform_apply+0x17/0x30 arch/x86/kernel/jump_label.c:145 #6: ffffffff8e333e60 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #6: ffffffff8e333e60 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #6: ffffffff8e333e60 (rcu_read_lock){....}-{1:2}, at: __pte_offset_map+0x82/0x380 mm/pgtable-generic.c:287 #7: ffff88801507b078 (ptlock_ptr(ptdesc)#2){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline] #7: ffff88801507b078 (ptlock_ptr(ptdesc)#2){+.+.}-{2:2}, at: __pte_offset_map_lock+0x1ba/0x300 mm/pgtable-generic.c:375 stack backtrace: CPU: 1 PID: 6521 Comm: syz-executor.2 Not tainted 6.9.0-syzkaller-12123-g531876c80004 #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