================================ WARNING: inconsistent lock state 6.9.0-syzkaller-08565-g590016ad83de #0 Not tainted -------------------------------- inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage. syz-executor263/5093 [HC0[0]:SC0[0]:HE1:SE1] takes: ffff8880b9438828 (lock#9){?...}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b9438828 (lock#9){?...}-{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:178 [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/0x910 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/0x20b0 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+0xf5/0x240 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f irq event stamp: 4215 hardirqs last enabled at (4215): [] acct_update_integrals+0x37c/0x460 kernel/tsacct.c:160 hardirqs last disabled at (4214): [] acct_update_integrals+0x156/0x460 kernel/tsacct.c:157 softirqs last enabled at (2536): [] __do_softirq kernel/softirq.c:588 [inline] softirqs last enabled at (2536): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last enabled at (2536): [] __irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637 softirqs last disabled at (2515): [] __do_softirq kernel/softirq.c:588 [inline] softirqs last disabled at (2515): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last disabled at (2515): [] __irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(lock#9); lock(lock#9); *** DEADLOCK *** 1 lock held by syz-executor263/5093: #0: ffff88807f236a20 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_lock include/linux/mmap_lock.h:146 [inline] #0: ffff88807f236a20 (&mm->mmap_lock){++++}-{3:3}, at: acct_collect+0x1cf/0x830 kernel/acct.c:563 stack backtrace: CPU: 0 PID: 5093 Comm: syz-executor263 Not tainted 6.9.0-syzkaller-08565-g590016ad83de #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: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 include/linux/mmap_lock.h:172 [inline] acct_collect+0x81d/0x830 kernel/acct.c:566 do_exit+0x92a/0x27e0 kernel/exit.c:856 do_group_exit+0x207/0x2c0 kernel/exit.c:1026 __do_sys_exit_group kernel/exit.c:1037 [inline] __se_sys_exit_group kernel/exit.c:1035 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1035 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fac400dbf89 Code: 90 49 c7 c0 b8 ff ff ff be e7 00 00 00 ba 3c 00 00 00 eb 12 0f 1f 44 00 00 89 d0 0f 05 48 3d 00 f0 ff ff 77 1c f4 89 f0 0f 05 <48> 3d 00 f0 ff ff 76 e7 f7 d8 64 41 89 00 eb df 0f 1f 80 00 00 00 RSP: 002b:00007ffdeb91c088 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fac400dbf89 RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000000 RBP: 00007fac401572b0 R08: ffffffffffffffb8 R09: 0000000000000006 R10: 00000000ffffffff R11: 0000000000000246 R12: 00007fac401572b0 R13: 0000000000000000 R14: 00007fac40157d00 R15: 00007fac400ad1c0