====================================================== WARNING: possible circular locking dependency detected 6.6.102-syzkaller #0 Not tainted ------------------------------------------------------ syz.9.2694/21464 is trying to acquire lock: ffff8880b8f295a8 (krc.lock){..-.}-{2:2}, at: krc_this_cpu_lock kernel/rcu/tree.c:2959 [inline] ffff8880b8f295a8 (krc.lock){..-.}-{2:2}, at: add_ptr_to_bulk_krc_lock kernel/rcu/tree.c:3368 [inline] ffff8880b8f295a8 (krc.lock){..-.}-{2:2}, at: kvfree_call_rcu+0x15a/0x780 kernel/rcu/tree.c:3453 but task is already holding lock: ffff8880b8f2b958 (hrtimer_bases.lock){-.-.}-{2:2}, at: lock_hrtimer_base kernel/time/hrtimer.c:181 [inline] ffff8880b8f2b958 (hrtimer_bases.lock){-.-.}-{2:2}, at: hrtimer_start_range_ns+0xf3/0x1000 kernel/time/hrtimer.c:1354 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (hrtimer_bases.lock){-.-.}-{2:2}: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xa8/0xf0 kernel/locking/spinlock.c:162 lock_hrtimer_base kernel/time/hrtimer.c:181 [inline] hrtimer_start_range_ns+0xf3/0x1000 kernel/time/hrtimer.c:1354 hrtimer_start include/linux/hrtimer.h:421 [inline] run_page_cache_worker kernel/rcu/tree.c:3350 [inline] kvfree_call_rcu+0x5d5/0x780 kernel/rcu/tree.c:3455 rtnl_register_internal+0x486/0x590 net/core/rtnetlink.c:264 rtnl_register+0x32/0x70 net/core/rtnetlink.c:314 ip_rt_init+0x2ec/0x390 net/ipv4/route.c:3793 ip_init+0xe/0x20 net/ipv4/ip_output.c:1663 inet_init+0x2c1/0x3e0 net/ipv4/af_inet.c:2024 do_one_initcall+0x1fd/0x750 init/main.c:1238 do_initcall_level+0x137/0x1f0 init/main.c:1300 do_initcalls+0x69/0xd0 init/main.c:1316 kernel_init_freeable+0x3d2/0x570 init/main.c:1553 kernel_init+0x1d/0x1c0 init/main.c:1443 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293 -> #0 (krc.lock){..-.}-{2:2}: check_prev_add kernel/locking/lockdep.c:3134 [inline] check_prevs_add kernel/locking/lockdep.c:3253 [inline] validate_chain kernel/locking/lockdep.c:3869 [inline] __lock_acquire+0x2ddb/0x7c80 kernel/locking/lockdep.c:5137 lock_acquire+0x197/0x410 kernel/locking/lockdep.c:5754 __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:2959 [inline] add_ptr_to_bulk_krc_lock kernel/rcu/tree.c:3368 [inline] kvfree_call_rcu+0x15a/0x780 kernel/rcu/tree.c:3453 trie_delete_elem+0x535/0x6a0 kernel/bpf/lpm_trie.c:545 bpf_prog_2c29ac5cdc6b1842+0x42/0x46 bpf_dispatcher_nop_func include/linux/bpf.h:1213 [inline] __bpf_prog_run include/linux/filter.h:612 [inline] bpf_prog_run include/linux/filter.h:619 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2322 [inline] bpf_trace_run2+0x1d1/0x3c0 kernel/trace/bpf_trace.c:2361 __bpf_trace_hrtimer_start+0xfb/0x150 include/trace/events/timer.h:202 trace_hrtimer_start include/trace/events/timer.h:202 [inline] debug_activate kernel/time/hrtimer.c:506 [inline] enqueue_hrtimer+0x318/0x370 kernel/time/hrtimer.c:1113 __hrtimer_start_range_ns kernel/time/hrtimer.c:1295 [inline] hrtimer_start_range_ns+0xb4c/0x1000 kernel/time/hrtimer.c:1356 common_timer_set+0x3be/0x4d0 kernel/time/posix-timers.c:896 do_timer_settime+0x1bd/0x300 kernel/time/posix-timers.c:926 __do_sys_timer_settime kernel/time/posix-timers.c:955 [inline] __se_sys_timer_settime kernel/time/posix-timers.c:941 [inline] __x64_sys_timer_settime+0x1a6/0x240 kernel/time/posix-timers.c:941 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 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 *** 3 locks held by syz.9.2694/21464: #0: ffff8880317efaa8 (&new_timer->it_lock){-.-.}-{2:2}, at: __lock_timer+0x2b6/0x3f0 kernel/time/posix-timers.c:596 #1: ffff8880b8f2b958 (hrtimer_bases.lock){-.-.}-{2:2}, at: lock_hrtimer_base kernel/time/hrtimer.c:181 [inline] #1: ffff8880b8f2b958 (hrtimer_bases.lock){-.-.}-{2:2}, at: hrtimer_start_range_ns+0xf3/0x1000 kernel/time/hrtimer.c:1354 #2: ffffffff8cd2fbe0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:334 [inline] #2: ffffffff8cd2fbe0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:786 [inline] #2: ffffffff8cd2fbe0 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2321 [inline] #2: ffffffff8cd2fbe0 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0xde/0x3c0 kernel/trace/bpf_trace.c:2361 stack backtrace: CPU: 1 PID: 21464 Comm: syz.9.2694 Not tainted 6.6.102-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 Call Trace: dump_stack_lvl+0x16c/0x230 lib/dump_stack.c:106 check_noncircular+0x2bd/0x3c0 kernel/locking/lockdep.c:2187 check_prev_add kernel/locking/lockdep.c:3134 [inline] check_prevs_add kernel/locking/lockdep.c:3253 [inline] validate_chain kernel/locking/lockdep.c:3869 [inline] __lock_acquire+0x2ddb/0x7c80 kernel/locking/lockdep.c:5137 lock_acquire+0x197/0x410 kernel/locking/lockdep.c:5754 __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:2959 [inline] add_ptr_to_bulk_krc_lock kernel/rcu/tree.c:3368 [inline] kvfree_call_rcu+0x15a/0x780 kernel/rcu/tree.c:3453 trie_delete_elem+0x535/0x6a0 kernel/bpf/lpm_trie.c:545 bpf_prog_2c29ac5cdc6b1842+0x42/0x46 bpf_dispatcher_nop_func include/linux/bpf.h:1213 [inline] __bpf_prog_run include/linux/filter.h:612 [inline] bpf_prog_run include/linux/filter.h:619 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2322 [inline] bpf_trace_run2+0x1d1/0x3c0 kernel/trace/bpf_trace.c:2361 __bpf_trace_hrtimer_start+0xfb/0x150 include/trace/events/timer.h:202 trace_hrtimer_start include/trace/events/timer.h:202 [inline] debug_activate kernel/time/hrtimer.c:506 [inline] enqueue_hrtimer+0x318/0x370 kernel/time/hrtimer.c:1113 __hrtimer_start_range_ns kernel/time/hrtimer.c:1295 [inline] hrtimer_start_range_ns+0xb4c/0x1000 kernel/time/hrtimer.c:1356 common_timer_set+0x3be/0x4d0 kernel/time/posix-timers.c:896 do_timer_settime+0x1bd/0x300 kernel/time/posix-timers.c:926 __do_sys_timer_settime kernel/time/posix-timers.c:955 [inline] __se_sys_timer_settime kernel/time/posix-timers.c:941 [inline] __x64_sys_timer_settime+0x1a6/0x240 kernel/time/posix-timers.c:941 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f8d4718ebe9 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:00007f8d47ffa038 EFLAGS: 00000246 ORIG_RAX: 00000000000000df RAX: ffffffffffffffda RBX: 00007f8d473b5fa0 RCX: 00007f8d4718ebe9 RDX: 0000200000000200 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 00007f8d47211e19 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f8d473b6038 R14: 00007f8d473b5fa0 R15: 00007ffff33b5148