====================================================== WARNING: possible circular locking dependency detected 6.1.143-syzkaller #0 Not tainted ------------------------------------------------------ syz.0.308/5344 is trying to acquire lock: ffff8880b8e281d8 (krc.lock){..-.}-{2:2}, at: krc_this_cpu_lock kernel/rcu/tree.c:2991 [inline] ffff8880b8e281d8 (krc.lock){..-.}-{2:2}, at: add_ptr_to_bulk_krc_lock kernel/rcu/tree.c:3311 [inline] ffff8880b8e281d8 (krc.lock){..-.}-{2:2}, at: kvfree_call_rcu+0x184/0x870 kernel/rcu/tree.c:3402 but task is already holding lock: ffff8880b8e28418 (&base->lock){-.-.}-{2:2}, at: lock_timer_base+0x123/0x270 kernel/time/timer.c:999 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&base->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_timer_base+0x123/0x270 kernel/time/timer.c:999 __mod_timer+0x117/0xd20 kernel/time/timer.c:1072 queue_delayed_work_on+0x126/0x1e0 kernel/workqueue.c:1704 queue_delayed_work include/linux/workqueue.h:527 [inline] schedule_delayed_monitor_work kernel/rcu/tree.c:3172 [inline] kvfree_call_rcu+0x4cb/0x870 kernel/rcu/tree.c:3428 rtnl_register_internal+0x489/0x590 net/core/rtnetlink.c:260 rtnl_register+0x2e/0x70 net/core/rtnetlink.c:310 ip_rt_init+0x323/0x3b5 net/ipv4/route.c:3793 ip_init+0xa/0x14 net/ipv4/ip_output.c:1771 inet_init+0x2bd/0x3cf net/ipv4/af_inet.c:2033 do_one_initcall+0x214/0x7a0 init/main.c:1298 do_initcall_level+0x137/0x1e4 init/main.c:1371 do_initcalls+0x4b/0x8a init/main.c:1387 kernel_init_freeable+0x3fa/0x5ac init/main.c:1626 kernel_init+0x19/0x1b0 init/main.c:1514 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 -> #0 (krc.lock){..-.}-{2:2}: check_prev_add kernel/locking/lockdep.c:3090 [inline] check_prevs_add kernel/locking/lockdep.c:3209 [inline] validate_chain kernel/locking/lockdep.c:3825 [inline] __lock_acquire+0x2cf8/0x7c50 kernel/locking/lockdep.c:5049 lock_acquire+0x1b4/0x490 kernel/locking/lockdep.c:5662 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154 krc_this_cpu_lock kernel/rcu/tree.c:2991 [inline] add_ptr_to_bulk_krc_lock kernel/rcu/tree.c:3311 [inline] kvfree_call_rcu+0x184/0x870 kernel/rcu/tree.c:3402 trie_delete_elem+0x52d/0x690 kernel/bpf/lpm_trie.c:545 bpf_prog_2c29ac5cdc6b1842+0x3a/0x3e bpf_dispatcher_nop_func include/linux/bpf.h:1001 [inline] __bpf_prog_run include/linux/filter.h:603 [inline] bpf_prog_run include/linux/filter.h:610 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2285 [inline] bpf_trace_run3+0x1e3/0x400 kernel/trace/bpf_trace.c:2325 trace_timer_start include/trace/events/timer.h:53 [inline] enqueue_timer+0x411/0x5c0 kernel/time/timer.c:609 internal_add_timer kernel/time/timer.c:634 [inline] __mod_timer+0x8e1/0xd20 kernel/time/timer.c:1115 mrp_join_timer_arm net/802/mrp.c:596 [inline] mrp_join_timer+0x13b/0x170 net/802/mrp.c:611 call_timer_fn+0x1a0/0x670 kernel/time/timer.c:1504 expire_timers kernel/time/timer.c:1549 [inline] __run_timers+0x525/0x7c0 kernel/time/timer.c:1820 run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1833 handle_softirqs+0x2a1/0x920 kernel/softirq.c:596 __do_softirq kernel/softirq.c:630 [inline] invoke_softirq kernel/softirq.c:470 [inline] __irq_exit_rcu+0x12f/0x220 kernel/softirq.c:679 irq_exit_rcu+0x5/0x20 kernel/softirq.c:691 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1118 [inline] sysvec_apic_timer_interrupt+0x52/0xc0 arch/x86/kernel/apic/apic.c:1118 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:691 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&base->lock); lock(krc.lock); lock(&base->lock); lock(krc.lock); *** DEADLOCK *** 4 locks held by syz.0.308/5344: #0: ffffc9000376fb20 ((&app->join_timer)#2){+.-.}-{0:0}, at: call_timer_fn+0xc1/0x670 kernel/time/timer.c:1501 #1: ffff888056c17cc8 (&app->lock#2){+.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline] #1: ffff888056c17cc8 (&app->lock#2){+.-.}-{2:2}, at: mrp_join_timer+0xd4/0x170 net/802/mrp.c:609 #2: ffff8880b8e28418 (&base->lock){-.-.}-{2:2}, at: lock_timer_base+0x123/0x270 kernel/time/timer.c:999 #3: ffffffff8cb2aaa0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline] #3: ffffffff8cb2aaa0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline] #3: ffffffff8cb2aaa0 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2284 [inline] #3: ffffffff8cb2aaa0 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run3+0xf0/0x400 kernel/trace/bpf_trace.c:2325 stack backtrace: CPU: 0 PID: 5344 Comm: syz.0.308 Not tainted 6.1.143-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: dump_stack_lvl+0x168/0x22e lib/dump_stack.c:106 check_noncircular+0x274/0x310 kernel/locking/lockdep.c:2170 check_prev_add kernel/locking/lockdep.c:3090 [inline] check_prevs_add kernel/locking/lockdep.c:3209 [inline] validate_chain kernel/locking/lockdep.c:3825 [inline] __lock_acquire+0x2cf8/0x7c50 kernel/locking/lockdep.c:5049 lock_acquire+0x1b4/0x490 kernel/locking/lockdep.c:5662 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154 krc_this_cpu_lock kernel/rcu/tree.c:2991 [inline] add_ptr_to_bulk_krc_lock kernel/rcu/tree.c:3311 [inline] kvfree_call_rcu+0x184/0x870 kernel/rcu/tree.c:3402 trie_delete_elem+0x52d/0x690 kernel/bpf/lpm_trie.c:545 bpf_prog_2c29ac5cdc6b1842+0x3a/0x3e bpf_dispatcher_nop_func include/linux/bpf.h:1001 [inline] __bpf_prog_run include/linux/filter.h:603 [inline] bpf_prog_run include/linux/filter.h:610 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2285 [inline] bpf_trace_run3+0x1e3/0x400 kernel/trace/bpf_trace.c:2325 trace_timer_start include/trace/events/timer.h:53 [inline] enqueue_timer+0x411/0x5c0 kernel/time/timer.c:609 internal_add_timer kernel/time/timer.c:634 [inline] __mod_timer+0x8e1/0xd20 kernel/time/timer.c:1115 mrp_join_timer_arm net/802/mrp.c:596 [inline] mrp_join_timer+0x13b/0x170 net/802/mrp.c:611 call_timer_fn+0x1a0/0x670 kernel/time/timer.c:1504 expire_timers kernel/time/timer.c:1549 [inline] __run_timers+0x525/0x7c0 kernel/time/timer.c:1820 run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1833 handle_softirqs+0x2a1/0x920 kernel/softirq.c:596 __do_softirq kernel/softirq.c:630 [inline] invoke_softirq kernel/softirq.c:470 [inline] __irq_exit_rcu+0x12f/0x220 kernel/softirq.c:679 irq_exit_rcu+0x5/0x20 kernel/softirq.c:691 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1118 [inline] sysvec_apic_timer_interrupt+0x52/0xc0 arch/x86/kernel/apic/apic.c:1118 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:691 RIP: 0033:0x7f753286ec41 Code: 00 0f 84 cc fd ff ff 48 8b 43 38 49 83 ec 01 41 83 e4 03 c6 40 01 00 0f 85 b6 fd ff ff 48 8b 43 38 c6 40 02 00 e9 a9 fd ff ff <48> 89 ee 48 c1 e0 0a 48 c1 ee 14 81 e6 ff 03 00 00 48 8d 44 06 10 RSP: 002b:00007ffdb115f480 EFLAGS: 00000246 RAX: 0000000000000000 RBX: 00007f75336e5720 RCX: 000000110c230000 RDX: 0000000000001e83 RSI: ffffffffbfffffff RDI: 0000000000000006 RBP: ffffffff818e9e83 R08: 00007f7532bb6038 R09: 00007f7532ba2000 R10: 00007f7531dff008 R11: 0000000000000006 R12: 0000000000000006 R13: 0000000000000000 R14: ffffffff818e97e9 R15: 0000000000000000