================================ WARNING: inconsistent lock state 6.10.0-rc1-syzkaller-gf472e923bf4b #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz-executor.3/7789 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff8880b9438828 (lock#10){?.+.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b9438828 (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] vm_mmap_pgoff+0x3c2/0x3d0 mm/util.c:575 ksys_mmap_pgoff+0x4f1/0x720 mm/mmap.c:1443 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: 222 hardirqs last enabled at (221): [] __text_poke+0x9bf/0xd30 arch/x86/kernel/alternative.c:1943 hardirqs last disabled at (222): [] 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.3/7789: #0: ffffffff947f2e30 (&pmus_srcu){.+.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:116 [inline] #0: ffffffff947f2e30 (&pmus_srcu){.+.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:215 [inline] #0: ffffffff947f2e30 (&pmus_srcu){.+.+}-{0:0}, at: perf_init_event kernel/events/core.c:11715 [inline] #0: ffffffff947f2e30 (&pmus_srcu){.+.+}-{0:0}, at: perf_event_alloc+0xc7d/0x20a0 kernel/events/core.c:12033 #1: ffffffff8e38eb68 (event_mutex){+.+.}-{3:3}, at: perf_trace_init+0x53/0x2e0 kernel/trace/trace_event_perf.c:221 #2: ffffffff8e3809a8 (tracepoints_mutex){+.+.}-{3:3}, at: tracepoint_probe_register_prio kernel/tracepoint.c:507 [inline] #2: ffffffff8e3809a8 (tracepoints_mutex){+.+.}-{3:3}, at: tracepoint_probe_register+0xb6/0x160 kernel/tracepoint.c:531 #3: ffffffff8e1ce570 (cpu_hotplug_lock){++++}-{0:0}, at: static_key_enable+0x12/0x20 kernel/jump_label.c:217 #4: ffffffff8e3e1a08 (jump_label_mutex){+.+.}-{3:3}, at: jump_label_lock kernel/jump_label.c:27 [inline] #4: ffffffff8e3e1a08 (jump_label_mutex){+.+.}-{3:3}, at: static_key_enable_cpuslocked+0xd7/0x260 kernel/jump_label.c:202 #5: ffffffff8e1e3648 (text_mutex){+.+.}-{3:3}, at: arch_jump_label_transform_apply+0x17/0x30 arch/x86/kernel/jump_label.c:145 #6: ffffffff8e333f60 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #6: ffffffff8e333f60 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #6: ffffffff8e333f60 (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: 0 PID: 7789 Comm: syz-executor.3 Not tainted 6.10.0-rc1-syzkaller-gf472e923bf4b #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 mark_lock+0x223/0x350 kernel/locking/lockdep.c:4678 mark_usage kernel/locking/lockdep.c:4564 [inline] __lock_acquire+0xb8e/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