================================ WARNING: inconsistent lock state 6.10.0-syzkaller-04558-g6189fa6faa09 #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz.3.237/6067 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff8880b9238798 (lock#10){?.+.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b9238798 (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:5753 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 include/linux/mmap_lock.h:170 [inline] __get_user_pages_locked mm/gup.c:1962 [inline] get_dump_page+0x2e4/0x2f0 mm/gup.c:2389 dump_user_range+0x14c/0x950 fs/coredump.c:952 elf_core_dump+0x3de6/0x4720 fs/binfmt_elf.c:2116 do_coredump+0x19e1/0x2940 fs/coredump.c:767 get_signal+0x13fa/0x1740 kernel/signal.c:2902 arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:310 exit_to_user_mode_loop kernel/entry/common.c:111 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] irqentry_exit_to_user_mode+0x79/0x280 kernel/entry/common.c:231 exc_page_fault+0x590/0x8c0 arch/x86/mm/fault.c:1542 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 irq event stamp: 274 hardirqs last enabled at (273): [] __text_poke+0x9bf/0xd30 arch/x86/kernel/alternative.c:1959 hardirqs last disabled at (274): [] sysvec_irq_work+0xe/0xc0 arch/x86/kernel/irq_work.c:17 softirqs last enabled at (0): [] rcu_lock_acquire include/linux/rcupdate.h:327 [inline] softirqs last enabled at (0): [] rcu_read_lock include/linux/rcupdate.h:839 [inline] softirqs last enabled at (0): [] copy_process+0xa03/0x3dc0 kernel/fork.c:2242 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.3.237/6067: #0: ffffffff94d3ad30 (&pmus_srcu){.+.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:151 [inline] #0: ffffffff94d3ad30 (&pmus_srcu){.+.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:250 [inline] #0: ffffffff94d3ad30 (&pmus_srcu){.+.+}-{0:0}, at: perf_init_event kernel/events/core.c:11750 [inline] #0: ffffffff94d3ad30 (&pmus_srcu){.+.+}-{0:0}, at: perf_event_alloc+0xd7e/0x22d0 kernel/events/core.c:12070 #1: ffffffff8e791528 (event_mutex){+.+.}-{3:3}, at: perf_trace_init+0x53/0x2e0 kernel/trace/trace_event_perf.c:221 #2: ffffffff8e783368 (tracepoints_mutex){+.+.}-{3:3}, at: tracepoint_probe_register_prio kernel/tracepoint.c:507 [inline] #2: ffffffff8e783368 (tracepoints_mutex){+.+.}-{3:3}, at: tracepoint_probe_register+0xb6/0x160 kernel/tracepoint.c:531 #3: ffffffff8e5d05b0 (cpu_hotplug_lock){++++}-{0:0}, at: static_key_enable+0x12/0x20 kernel/jump_label.c:222 #4: ffffffff8e7e5388 (jump_label_mutex){+.+.}-{3:3}, at: jump_label_lock kernel/jump_label.c:27 [inline] #4: ffffffff8e7e5388 (jump_label_mutex){+.+.}-{3:3}, at: static_key_enable_cpuslocked+0xd7/0x260 kernel/jump_label.c:207 #5: ffffffff8e5e5728 (text_mutex){+.+.}-{3:3}, at: arch_jump_label_transform_apply+0x17/0x30 arch/x86/kernel/jump_label.c:145 #6: ffffffff8e735fe0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:327 [inline] #6: ffffffff8e735fe0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:839 [inline] #6: ffffffff8e735fe0 (rcu_read_lock){....}-{1:2}, at: __pte_offset_map+0x82/0x380 mm/pgtable-generic.c:287 #7: ffff88801547b078 (ptlock_ptr(ptdesc)#2){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline] #7: ffff88801547b078 (ptlock_ptr(ptdesc)#2){+.+.}-{2:2}, at: __pte_offset_map_lock+0x1ba/0x300 mm/pgtable-generic.c:375 stack backtrace: CPU: 0 PID: 6067 Comm: syz.3.237 Not tainted 6.10.0-syzkaller-04558-g6189fa6faa09 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/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:4012 mark_lock_irq+0xbb/0xc20 kernel/locking/lockdep.c:4215 mark_lock+0x223/0x350 kernel/locking/lockdep.c:4677 mark_usage kernel/locking/lockdep.c:4563 [inline] __lock_acquire+0xb8e/0x1fd0 kernel/locking/lockdep.c:5090 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5753 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:1046 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 RIP: 0010:__text_poke+0xa4a/0xd30 arch/x86/kernel/alternative.c:1960 Code: 7c 24 50 00 75 19 e8 b5 2b 61 00 eb 18 e8 ae 2b 61 00 e8 09 97 7b 0a 48 83 7c 24 50 00 74 e7 e8 9c 2b 61 00 fb 48 8b 44 24 78 <42> 80 3c 28 00 74 0d 48 8d bc 24 60 01 00 00 e8 c2 96 c7 00 48 8b RSP: 0018:ffffc90017cdf5c0 EFLAGS: 00000283 RAX: 1ffff92002f9bee4 RBX: 0000000000000000 RCX: 0000000000040000 RDX: ffffc9000a30a000 RSI: 0000000000007e30 RDI: 0000000000007e31 RBP: ffffc90017cdf790 R08: ffffffff813531f4 R09: 1ffffffff269e0b8 R10: dffffc0000000000 R11: fffffbfff269e0b9 R12: 1ffff92002f9bec8 R13: dffffc0000000000 R14: 0000000000000046 R15: ffffffff81b52753 text_poke arch/x86/kernel/alternative.c:1984 [inline] text_poke_bp_batch+0x265/0xb30 arch/x86/kernel/alternative.c:2292 text_poke_flush arch/x86/kernel/alternative.c:2486 [inline] text_poke_finish+0x30/0x50 arch/x86/kernel/alternative.c:2493 arch_jump_label_transform_apply+0x1c/0x30 arch/x86/kernel/jump_label.c:146 static_key_enable_cpuslocked+0x136/0x260 kernel/jump_label.c:210 static_key_enable+0x1a/0x20 kernel/jump_label.c:223 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:10245 perf_try_init_event+0x139/0x3f0 kernel/events/core.c:11720 perf_init_event kernel/events/core.c:11790 [inline] perf_event_alloc+0x131a/0x22d0 kernel/events/core.c:12070 __do_sys_perf_event_open kernel/events/core.c:12577 [inline] __se_sys_perf_event_open+0xb43/0x38d0 kernel/events/core.c:12468 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:0x7f1930f75f19 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f1931d7b048 EFLAGS: 00000246 ORIG_RAX: 000000000000012a RAX: ffffffffffffffda RBX: 00007f1931105f60 RCX: 00007f1930f75f19 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000480 RBP: 00007f1930fe4e68 R08: 0000000000000000 R09: 0000000000000000 R10: ffffffffffffffff R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f1931105f60 R15: 00007fffe435e0a8 ---------------- Code disassembly (best guess): 0: 7c 24 jl 0x26 2: 50 push %rax 3: 00 75 19 add %dh,0x19(%rbp) 6: e8 b5 2b 61 00 call 0x612bc0 b: eb 18 jmp 0x25 d: e8 ae 2b 61 00 call 0x612bc0 12: e8 09 97 7b 0a call 0xa7b9720 17: 48 83 7c 24 50 00 cmpq $0x0,0x50(%rsp) 1d: 74 e7 je 0x6 1f: e8 9c 2b 61 00 call 0x612bc0 24: fb sti 25: 48 8b 44 24 78 mov 0x78(%rsp),%rax * 2a: 42 80 3c 28 00 cmpb $0x0,(%rax,%r13,1) <-- trapping instruction 2f: 74 0d je 0x3e 31: 48 8d bc 24 60 01 00 lea 0x160(%rsp),%rdi 38: 00 39: e8 c2 96 c7 00 call 0xc79700 3e: 48 rex.W 3f: 8b .byte 0x8b