====================================================== WARNING: possible circular locking dependency detected 5.15.189-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor/4193 is trying to acquire lock: ffff888023205db8 (&trie->lock){..-.}-{2:2}, at: trie_delete_elem+0x90/0x710 kernel/bpf/lpm_trie.c:467 but task is already holding lock: ffff8880b902a218 (hrtimer_bases.lock){-.-.}-{2:2}, at: lock_hrtimer_base kernel/time/hrtimer.c:168 [inline] ffff8880b902a218 (hrtimer_bases.lock){-.-.}-{2:2}, at: hrtimer_start_range_ns+0xff/0xc20 kernel/time/hrtimer.c:1289 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (hrtimer_bases.lock){-.-.}-{2:2}: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xa4/0xf0 kernel/locking/spinlock.c:162 lock_hrtimer_base kernel/time/hrtimer.c:168 [inline] hrtimer_start_range_ns+0xff/0xc20 kernel/time/hrtimer.c:1289 hrtimer_start include/linux/hrtimer.h:420 [inline] run_page_cache_worker kernel/rcu/tree.c:3492 [inline] kvfree_call_rcu+0x60d/0x7c0 kernel/rcu/tree.c:3603 rtnl_register_internal+0x44e/0x540 net/core/rtnetlink.c:223 rtnl_register+0x2e/0x70 net/core/rtnetlink.c:273 ip_rt_init+0x2e0/0x3a0 net/ipv4/route.c:3795 ip_init+0xa/0x20 net/ipv4/ip_output.c:1749 inet_init+0x28b/0x3a0 net/ipv4/af_inet.c:2007 do_one_initcall+0x1ee/0x680 init/main.c:1302 do_initcall_level+0x137/0x1f0 init/main.c:1375 do_initcalls+0x4b/0x90 init/main.c:1391 kernel_init_freeable+0x3ce/0x560 init/main.c:1615 kernel_init+0x19/0x1b0 init/main.c:1506 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 -> #1 (krc.lock){..-.}-{2:2}: __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154 krc_this_cpu_lock kernel/rcu/tree.c:3203 [inline] add_ptr_to_bulk_krc_lock kernel/rcu/tree.c:3510 [inline] kvfree_call_rcu+0x186/0x7c0 kernel/rcu/tree.c:3601 trie_delete_elem+0x58c/0x710 kernel/bpf/lpm_trie.c:-1 0xffffffffa000ce6a bpf_dispatcher_nop_func include/linux/bpf.h:790 [inline] __bpf_prog_run include/linux/filter.h:628 [inline] bpf_prog_run include/linux/filter.h:635 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:1878 [inline] bpf_trace_run2+0x15b/0x2d0 kernel/trace/bpf_trace.c:1915 __bpf_trace_kfree+0x6e/0x90 include/trace/events/kmem.h:118 trace_kfree include/trace/events/kmem.h:118 [inline] kfree+0x25f/0x2a0 mm/slub.c:4549 tomoyo_realpath_from_path+0x10b/0x610 security/tomoyo/realpath.c:253 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x1cd/0x510 security/tomoyo/file.c:822 security_inode_getattr+0xcf/0x120 security/security.c:1348 vfs_getattr+0x26/0x3a0 fs/stat.c:157 vfs_statx+0x149/0x4d0 fs/stat.c:225 vfs_fstatat fs/stat.c:243 [inline] __do_sys_newfstatat fs/stat.c:411 [inline] __se_sys_newfstatat fs/stat.c:405 [inline] __x64_sys_newfstatat+0x12c/0x1b0 fs/stat.c:405 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 -> #0 (&trie->lock){..-.}-{2:2}: check_prev_add kernel/locking/lockdep.c:3053 [inline] check_prevs_add kernel/locking/lockdep.c:3172 [inline] validate_chain kernel/locking/lockdep.c:3788 [inline] __lock_acquire+0x2c33/0x7c60 kernel/locking/lockdep.c:5012 lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xa4/0xf0 kernel/locking/spinlock.c:162 trie_delete_elem+0x90/0x710 kernel/bpf/lpm_trie.c:467 bpf_prog_1db1603a7cfa36fb+0x3d/0x6e4 bpf_dispatcher_nop_func include/linux/bpf.h:790 [inline] __bpf_prog_run include/linux/filter.h:628 [inline] bpf_prog_run include/linux/filter.h:635 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:1878 [inline] bpf_trace_run2+0x15b/0x2d0 kernel/trace/bpf_trace.c:1915 trace_hrtimer_start include/trace/events/timer.h:199 [inline] debug_activate kernel/time/hrtimer.c:466 [inline] enqueue_hrtimer+0x314/0x370 kernel/time/hrtimer.c:1074 __hrtimer_start_range_ns kernel/time/hrtimer.c:1249 [inline] hrtimer_start_range_ns+0xa7e/0xc20 kernel/time/hrtimer.c:1291 hrtimer_start_expires include/linux/hrtimer.h:434 [inline] hrtimer_sleeper_start_expires kernel/time/hrtimer.c:1970 [inline] do_nanosleep+0x1a1/0x760 kernel/time/hrtimer.c:2046 hrtimer_nanosleep+0x2f7/0x520 kernel/time/hrtimer.c:2102 __do_sys_clock_nanosleep kernel/time/posix-timers.c:1314 [inline] __se_sys_clock_nanosleep+0x2e6/0x370 kernel/time/posix-timers.c:1291 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 other info that might help us debug this: Chain exists of: &trie->lock --> krc.lock --> hrtimer_bases.lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(hrtimer_bases.lock); lock(krc.lock); lock(hrtimer_bases.lock); lock(&trie->lock); *** DEADLOCK *** 2 locks held by syz-executor/4193: #0: ffff8880b902a218 (hrtimer_bases.lock){-.-.}-{2:2}, at: lock_hrtimer_base kernel/time/hrtimer.c:168 [inline] #0: ffff8880b902a218 (hrtimer_bases.lock){-.-.}-{2:2}, at: hrtimer_start_range_ns+0xff/0xc20 kernel/time/hrtimer.c:1289 #1: ffffffff8c11c360 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x5/0x30 include/linux/rcupdate.h:311 stack backtrace: CPU: 0 PID: 4193 Comm: syz-executor Not tainted 5.15.189-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 Call Trace: dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106 check_noncircular+0x274/0x310 kernel/locking/lockdep.c:2133 check_prev_add kernel/locking/lockdep.c:3053 [inline] check_prevs_add kernel/locking/lockdep.c:3172 [inline] validate_chain kernel/locking/lockdep.c:3788 [inline] __lock_acquire+0x2c33/0x7c60 kernel/locking/lockdep.c:5012 lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xa4/0xf0 kernel/locking/spinlock.c:162 trie_delete_elem+0x90/0x710 kernel/bpf/lpm_trie.c:467 bpf_prog_1db1603a7cfa36fb+0x3d/0x6e4 bpf_dispatcher_nop_func include/linux/bpf.h:790 [inline] __bpf_prog_run include/linux/filter.h:628 [inline] bpf_prog_run include/linux/filter.h:635 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:1878 [inline] bpf_trace_run2+0x15b/0x2d0 kernel/trace/bpf_trace.c:1915 trace_hrtimer_start include/trace/events/timer.h:199 [inline] debug_activate kernel/time/hrtimer.c:466 [inline] enqueue_hrtimer+0x314/0x370 kernel/time/hrtimer.c:1074 __hrtimer_start_range_ns kernel/time/hrtimer.c:1249 [inline] hrtimer_start_range_ns+0xa7e/0xc20 kernel/time/hrtimer.c:1291 hrtimer_start_expires include/linux/hrtimer.h:434 [inline] hrtimer_sleeper_start_expires kernel/time/hrtimer.c:1970 [inline] do_nanosleep+0x1a1/0x760 kernel/time/hrtimer.c:2046 hrtimer_nanosleep+0x2f7/0x520 kernel/time/hrtimer.c:2102 __do_sys_clock_nanosleep kernel/time/posix-timers.c:1314 [inline] __se_sys_clock_nanosleep+0x2e6/0x370 kernel/time/posix-timers.c:1291 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f321d6864a5 Code: 24 0c 89 3c 24 48 89 4c 24 18 e8 f6 54 ff ff 4c 8b 54 24 18 48 8b 54 24 10 41 89 c0 8b 74 24 0c 8b 3c 24 b8 e6 00 00 00 0f 05 <44> 89 c7 48 89 04 24 e8 4f 55 ff ff 48 8b 04 24 48 83 c4 28 f7 d8 RSP: 002b:00007fff3e6455f0 EFLAGS: 00000293 ORIG_RAX: 00000000000000e6 RAX: ffffffffffffffda RBX: 0000000000000067 RCX: 00007f321d6864a5 RDX: 00007fff3e645630 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 00007fff3e64569c R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000001388 R13: 00000000000927c0 R14: 000000000001e397 R15: 00007fff3e6456f0