====================================================== WARNING: possible circular locking dependency detected 6.12.0-rc5-syzkaller-g6c52d4da1c74 #0 Not tainted ------------------------------------------------------ syz.7.233/7031 is trying to acquire lock: ffff8880b8729430 (krc.lock){-.-.}-{2:2}, at: krc_this_cpu_lock kernel/rcu/tree.c:3312 [inline] ffff8880b8729430 (krc.lock){-.-.}-{2:2}, at: add_ptr_to_bulk_krc_lock kernel/rcu/tree.c:3725 [inline] ffff8880b8729430 (krc.lock){-.-.}-{2:2}, at: kvfree_call_rcu+0x18a/0x790 kernel/rcu/tree.c:3811 but task is already holding lock: ffff8880b872c898 (hrtimer_bases.lock){-.-.}-{2:2}, at: __run_hrtimer kernel/time/hrtimer.c:1695 [inline] ffff8880b872c898 (hrtimer_bases.lock){-.-.}-{2:2}, at: __hrtimer_run_queues+0x670/0xd50 kernel/time/hrtimer.c:1755 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (hrtimer_bases.lock){-.-.}-{2:2}: lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5825 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162 lock_hrtimer_base kernel/time/hrtimer.c:175 [inline] hrtimer_start_range_ns+0x109/0xca0 kernel/time/hrtimer.c:1300 hrtimer_start include/linux/hrtimer.h:275 [inline] run_page_cache_worker kernel/rcu/tree.c:3707 [inline] kvfree_call_rcu+0x5e6/0x790 kernel/rcu/tree.c:3813 pwq_release_workfn+0x664/0x800 kernel/workqueue.c:5078 kthread_worker_fn+0x500/0xb70 kernel/kthread.c:844 kthread+0x2f0/0x390 kernel/kthread.c:389 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 -> #0 (krc.lock){-.-.}-{2:2}: check_prev_add kernel/locking/lockdep.c:3161 [inline] check_prevs_add kernel/locking/lockdep.c:3280 [inline] validate_chain+0x18ef/0x5920 kernel/locking/lockdep.c:3904 __lock_acquire+0x1384/0x2050 kernel/locking/lockdep.c:5202 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5825 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:154 krc_this_cpu_lock kernel/rcu/tree.c:3312 [inline] add_ptr_to_bulk_krc_lock kernel/rcu/tree.c:3725 [inline] kvfree_call_rcu+0x18a/0x790 kernel/rcu/tree.c:3811 trie_delete_elem+0x546/0x6a0 kernel/bpf/lpm_trie.c:540 bpf_prog_2c29ac5cdc6b1842+0x43/0x47 bpf_dispatcher_nop_func include/linux/bpf.h:1265 [inline] __bpf_prog_run include/linux/filter.h:701 [inline] bpf_prog_run include/linux/filter.h:708 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2316 [inline] bpf_trace_run2+0x2ec/0x540 kernel/trace/bpf_trace.c:2357 trace_hrtimer_start include/trace/events/timer.h:222 [inline] debug_activate kernel/time/hrtimer.c:479 [inline] enqueue_hrtimer+0x35a/0x3c0 kernel/time/hrtimer.c:1085 __run_hrtimer kernel/time/hrtimer.c:1708 [inline] __hrtimer_run_queues+0x6cb/0xd50 kernel/time/hrtimer.c:1755 hrtimer_interrupt+0x396/0x990 kernel/time/hrtimer.c:1817 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1038 [inline] __sysvec_apic_timer_interrupt+0x110/0x420 arch/x86/kernel/apic/apic.c:1055 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1049 [inline] sysvec_apic_timer_interrupt+0xa1/0xc0 arch/x86/kernel/apic/apic.c:1049 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 __wrmsr arch/x86/include/asm/msr.h:96 [inline] native_write_msr arch/x86/include/asm/msr.h:147 [inline] wrmsrl arch/x86/include/asm/msr.h:264 [inline] native_x2apic_icr_write arch/x86/include/asm/apic.h:233 [inline] __x2apic_send_IPI_dest arch/x86/kernel/apic/x2apic_phys.c:113 [inline] x2apic_send_IPI+0x7a/0xe0 arch/x86/kernel/apic/x2apic_phys.c:50 arch_send_call_function_single_ipi arch/x86/include/asm/smp.h:94 [inline] send_call_function_single_ipi kernel/smp.c:118 [inline] smp_call_function_many_cond+0x15c6/0x2ca0 kernel/smp.c:866 on_each_cpu_cond_mask+0x3f/0x80 kernel/smp.c:1051 on_each_cpu include/linux/smp.h:71 [inline] text_poke_sync arch/x86/kernel/alternative.c:2085 [inline] text_poke_bp_batch+0x352/0xb30 arch/x86/kernel/alternative.c:2295 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_may_exist+0x122/0x190 kernel/tracepoint.c:482 bpf_raw_tp_link_attach+0x48b/0x6e0 kernel/bpf/syscall.c:3849 bpf_raw_tracepoint_open+0x177/0x1f0 kernel/bpf/syscall.c:3880 __sys_bpf+0x3c0/0x810 kernel/bpf/syscall.c:5695 __do_sys_bpf kernel/bpf/syscall.c:5760 [inline] __se_sys_bpf kernel/bpf/syscall.c:5758 [inline] __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:5758 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 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(hrtimer_bases.lock); lock(krc.lock); lock(hrtimer_bases.lock); lock(krc.lock); *** DEADLOCK *** 6 locks held by syz.7.233/7031: #0: ffffffff8e98a4c8 (tracepoints_mutex){+.+.}-{3:3}, at: tracepoint_probe_register_prio_may_exist+0xbb/0x190 kernel/tracepoint.c:478 #1: ffffffff8e7d1d90 (cpu_hotplug_lock){++++}-{0:0}, at: static_key_enable+0x12/0x20 kernel/jump_label.c:222 #2: ffffffff8e9eda48 (jump_label_mutex){+.+.}-{3:3}, at: jump_label_lock kernel/jump_label.c:27 [inline] #2: ffffffff8e9eda48 (jump_label_mutex){+.+.}-{3:3}, at: static_key_enable_cpuslocked+0xd7/0x260 kernel/jump_label.c:207 #3: ffffffff8e7e6f48 (text_mutex){+.+.}-{3:3}, at: arch_jump_label_transform_apply+0x17/0x30 arch/x86/kernel/jump_label.c:145 #4: ffff8880b872c898 (hrtimer_bases.lock){-.-.}-{2:2}, at: __run_hrtimer kernel/time/hrtimer.c:1695 [inline] #4: ffff8880b872c898 (hrtimer_bases.lock){-.-.}-{2:2}, at: __hrtimer_run_queues+0x670/0xd50 kernel/time/hrtimer.c:1755 #5: ffffffff8e937da0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline] #5: ffffffff8e937da0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #5: ffffffff8e937da0 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2315 [inline] #5: ffffffff8e937da0 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1fc/0x540 kernel/trace/bpf_trace.c:2357 stack backtrace: CPU: 1 UID: 0 PID: 7031 Comm: syz.7.233 Not tainted 6.12.0-rc5-syzkaller-g6c52d4da1c74 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_circular_bug+0x13a/0x1b0 kernel/locking/lockdep.c:2074 check_noncircular+0x36a/0x4a0 kernel/locking/lockdep.c:2206 check_prev_add kernel/locking/lockdep.c:3161 [inline] check_prevs_add kernel/locking/lockdep.c:3280 [inline] validate_chain+0x18ef/0x5920 kernel/locking/lockdep.c:3904 __lock_acquire+0x1384/0x2050 kernel/locking/lockdep.c:5202 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5825 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:154 krc_this_cpu_lock kernel/rcu/tree.c:3312 [inline] add_ptr_to_bulk_krc_lock kernel/rcu/tree.c:3725 [inline] kvfree_call_rcu+0x18a/0x790 kernel/rcu/tree.c:3811 trie_delete_elem+0x546/0x6a0 kernel/bpf/lpm_trie.c:540 bpf_prog_2c29ac5cdc6b1842+0x43/0x47 bpf_dispatcher_nop_func include/linux/bpf.h:1265 [inline] __bpf_prog_run include/linux/filter.h:701 [inline] bpf_prog_run include/linux/filter.h:708 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2316 [inline] bpf_trace_run2+0x2ec/0x540 kernel/trace/bpf_trace.c:2357 trace_hrtimer_start include/trace/events/timer.h:222 [inline] debug_activate kernel/time/hrtimer.c:479 [inline] enqueue_hrtimer+0x35a/0x3c0 kernel/time/hrtimer.c:1085 __run_hrtimer kernel/time/hrtimer.c:1708 [inline] __hrtimer_run_queues+0x6cb/0xd50 kernel/time/hrtimer.c:1755 hrtimer_interrupt+0x396/0x990 kernel/time/hrtimer.c:1817 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1038 [inline] __sysvec_apic_timer_interrupt+0x110/0x420 arch/x86/kernel/apic/apic.c:1055 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1049 [inline] sysvec_apic_timer_interrupt+0xa1/0xc0 arch/x86/kernel/apic/apic.c:1049 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:arch_static_branch arch/x86/include/asm/jump_label.h:27 [inline] RIP: 0010:static_key_false include/linux/jump_label.h:207 [inline] RIP: 0010:native_write_msr arch/x86/include/asm/msr.h:149 [inline] RIP: 0010:wrmsrl arch/x86/include/asm/msr.h:264 [inline] RIP: 0010:native_x2apic_icr_write arch/x86/include/asm/apic.h:233 [inline] RIP: 0010:__x2apic_send_IPI_dest arch/x86/kernel/apic/x2apic_phys.c:113 [inline] RIP: 0010:x2apic_send_IPI+0x7a/0xe0 arch/x86/kernel/apic/x2apic_phys.c:50 Code: d8 48 c1 e8 03 42 0f b6 04 38 84 c0 75 29 8b 13 0f ae f0 0f ae e8 41 83 fe 02 b8 00 04 00 00 41 0f 45 c6 b9 30 08 00 00 0f 30 <66> 90 5b 41 5e 41 5f 5d c3 cc cc cc cc 89 d9 80 e1 07 80 c1 03 38 RSP: 0018:ffffc9000bf77618 EFLAGS: 00000206 RAX: 00000000000000fb RBX: ffff8880b8621168 RCX: 0000000000000830 RDX: 0000000000000000 RSI: 00000000000000fb RDI: 0000000000000000 RBP: ffffffff8e31fa50 R08: ffffffff8188e4fa R09: 1ffffffff203a085 R10: dffffc0000000000 R11: ffffffff813ed230 R12: dffffc0000000000 R13: ffff8880b873fc80 R14: 00000000000000fb R15: dffffc0000000000 arch_send_call_function_single_ipi arch/x86/include/asm/smp.h:94 [inline] send_call_function_single_ipi kernel/smp.c:118 [inline] smp_call_function_many_cond+0x15c6/0x2ca0 kernel/smp.c:866 on_each_cpu_cond_mask+0x3f/0x80 kernel/smp.c:1051 on_each_cpu include/linux/smp.h:71 [inline] text_poke_sync arch/x86/kernel/alternative.c:2085 [inline] text_poke_bp_batch+0x352/0xb30 arch/x86/kernel/alternative.c:2295 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_may_exist+0x122/0x190 kernel/tracepoint.c:482 bpf_raw_tp_link_attach+0x48b/0x6e0 kernel/bpf/syscall.c:3849 bpf_raw_tracepoint_open+0x177/0x1f0 kernel/bpf/syscall.c:3880 __sys_bpf+0x3c0/0x810 kernel/bpf/syscall.c:5695 __do_sys_bpf kernel/bpf/syscall.c:5760 [inline] __se_sys_bpf kernel/bpf/syscall.c:5758 [inline] __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:5758 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:0x7f5909f7e719 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:00007f590acf3038 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 00007f590a135f80 RCX: 00007f5909f7e719 RDX: 000000000000003d RSI: 0000000020000000 RDI: 0000000000000011 RBP: 00007f5909ff132e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f590a135f80 R15: 00007fff71009d28 ---------------- Code disassembly (best guess): 0: d8 48 c1 fmuls -0x3f(%rax) 3: e8 03 42 0f b6 call 0xb60f420b 8: 04 38 add $0x38,%al a: 84 c0 test %al,%al c: 75 29 jne 0x37 e: 8b 13 mov (%rbx),%edx 10: 0f ae f0 mfence 13: 0f ae e8 lfence 16: 41 83 fe 02 cmp $0x2,%r14d 1a: b8 00 04 00 00 mov $0x400,%eax 1f: 41 0f 45 c6 cmovne %r14d,%eax 23: b9 30 08 00 00 mov $0x830,%ecx 28: 0f 30 wrmsr * 2a: 66 90 xchg %ax,%ax <-- trapping instruction 2c: 5b pop %rbx 2d: 41 5e pop %r14 2f: 41 5f pop %r15 31: 5d pop %rbp 32: c3 ret 33: cc int3 34: cc int3 35: cc int3 36: cc int3 37: 89 d9 mov %ebx,%ecx 39: 80 e1 07 and $0x7,%cl 3c: 80 c1 03 add $0x3,%cl 3f: 38 .byte 0x38