================================ WARNING: inconsistent lock state 6.10.0-syzkaller-04559-g7d30b8aa4fc3 #0 Not tainted -------------------------------- inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage. syz.0.14/5343 [HC0[0]:SC0[0]:HE1: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 {IN-HARDIRQ-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_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 __text_poke+0xa4a/0xd30 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 irq event stamp: 4291 hardirqs last enabled at (4291): [] kasan_quarantine_put+0xdc/0x230 mm/kasan/quarantine.c:234 hardirqs last disabled at (4290): [] kasan_quarantine_put+0x3d/0x230 mm/kasan/quarantine.c:207 softirqs last enabled at (2966): [] __do_softirq kernel/softirq.c:588 [inline] softirqs last enabled at (2966): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last enabled at (2966): [] __irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637 softirqs last disabled at (2953): [] __do_softirq kernel/softirq.c:588 [inline] softirqs last disabled at (2953): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last disabled at (2953): [] __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.0.14/5343: #0: ffff88807c486098 (&mm->mmap_lock){++++}-{3:3}, at: mmap_write_lock include/linux/mmap_lock.h:106 [inline] #0: ffff88807c486098 (&mm->mmap_lock){++++}-{3:3}, at: exit_mmap+0x2a9/0xc80 mm/mmap.c:3349 stack backtrace: CPU: 0 PID: 5343 Comm: syz.0.14 Not tainted 6.10.0-syzkaller-04559-g7d30b8aa4fc3 #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:4586 [inline] __lock_acquire+0x112d/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_write_unlock include/linux/mmap_lock.h:129 [inline] exit_mmap+0xa83/0xc80 mm/mmap.c:3376 __mmput+0x115/0x390 kernel/fork.c:1343 exit_mm+0x220/0x310 kernel/exit.c:566 do_exit+0x9b2/0x27f0 kernel/exit.c:864 do_group_exit+0x207/0x2c0 kernel/exit.c:1026 get_signal+0x16a1/0x1740 kernel/signal.c:2917 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] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0xc9/0x370 kernel/entry/common.c:218 do_syscall_64+0x100/0x230 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f6ade577299 Code: Unable to access opcode bytes at 0x7f6ade57726f. RSP: 002b:00007ffe0a5645f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: ffffffffffffff92 RBX: 0000000000010371 RCX: 00007f6ade577299 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f6ade7062ec RBP: 00007f6ade7062ec R08: 00007f6ade705f80 R09: 00007ffe0a5648df R10: 00007ffe0a5646f0 R11: 0000000000000246 R12: 0000000000000032 R13: 00007ffe0a5646f0 R14: 00007ffe0a564710 R15: 000000000001033f