======================================================
WARNING: possible circular locking dependency detected
6.6.99-syzkaller #0 Not tainted
------------------------------------------------------
syz.1.152/6298 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:
ffff8880b8f297d8 (&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+0xa8/0xf0 kernel/locking/spinlock.c:162
lock_timer_base+0x123/0x270 kernel/time/timer.c:999
__mod_timer+0xf9/0xdb0 kernel/time/timer.c:1080
queue_delayed_work_on+0x12a/0x1e0 kernel/workqueue.c:1987
kvfree_call_rcu+0x541/0x780 kernel/rcu/tree.c:3481
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_run3+0x1e7/0x400 kernel/trace/bpf_trace.c:2362
__bpf_trace_timer_start+0x14a/0x1b0 include/trace/events/timer.h:53
trace_timer_start include/trace/events/timer.h:53 [inline]
enqueue_timer+0x398/0x530 kernel/time/timer.c:609
internal_add_timer kernel/time/timer.c:634 [inline]
__mod_timer+0x977/0xdb0 kernel/time/timer.c:1131
call_timer_fn+0x16e/0x530 kernel/time/timer.c:1700
expire_timers kernel/time/timer.c:1751 [inline]
__run_timers+0x52d/0x7d0 kernel/time/timer.c:2022
run_timer_softirq+0x67/0xf0 kernel/time/timer.c:2035
handle_softirqs+0x280/0x820 kernel/softirq.c:578
__do_softirq kernel/softirq.c:612 [inline]
invoke_softirq kernel/softirq.c:452 [inline]
__irq_exit_rcu+0xc7/0x190 kernel/softirq.c:661
irq_exit_rcu+0x9/0x20 kernel/softirq.c:673
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1088 [inline]
sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1088
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:687
lock_acquire+0x1f2/0x410 kernel/locking/lockdep.c:5758
rcu_lock_acquire include/linux/rcupdate.h:334 [inline]
rcu_read_lock_sched include/linux/rcupdate.h:878 [inline]
pfn_valid+0xe9/0x420 include/linux/mmzone.h:2011
page_table_check_clear+0x1e/0x6a0 mm/page_table_check.c:70
ptep_get_and_clear_full arch/x86/include/asm/jump_label.h:-1 [inline]
zap_pte_range mm/memory.c:1428 [inline]
zap_pmd_range mm/memory.c:1570 [inline]
zap_pud_range mm/memory.c:1599 [inline]
zap_p4d_range mm/memory.c:1620 [inline]
unmap_page_range+0x1ad1/0x2fe0 mm/memory.c:1641
unmap_vmas+0x25e/0x3a0 mm/memory.c:1731
exit_mmap+0x200/0xb50 mm/mmap.c:3298
__mmput+0x118/0x3c0 kernel/fork.c:1355
exit_mm+0x1da/0x2c0 kernel/exit.c:569
do_exit+0x88e/0x23c0 kernel/exit.c:870
do_group_exit+0x21b/0x2d0 kernel/exit.c:1024
get_signal+0x12fc/0x1400 kernel/signal.c:2902
arch_do_signal_or_restart+0x96/0x780 arch/x86/kernel/signal.c:310
exit_to_user_mode_loop+0x70/0x110 kernel/entry/common.c:174
exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:210
__syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline]
syscall_exit_to_user_mode+0x1a/0x50 kernel/entry/common.c:302
do_syscall_64+0x61/0xb0 arch/x86/entry/common.c:87
entry_SYSCALL_64_after_hwframe+0x68/0xd2
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 ***
7 locks held by syz.1.152/6298:
#0: ffff88807e179e20 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_lock include/linux/mmap_lock.h:146 [inline]
#0: ffff88807e179e20 (&mm->mmap_lock){++++}-{3:3}, at: exit_mmap+0x14a/0xb50 mm/mmap.c:3283
#1: ffffffff8cd2fba0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:334 [inline]
#1: ffffffff8cd2fba0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:786 [inline]
#1: ffffffff8cd2fba0 (rcu_read_lock){....}-{1:2}, at: __pte_offset_map+0x2c/0x2c0 mm/pgtable-generic.c:287
#2: ffff8880308fcf18 (ptlock_ptr(ptdesc)#2){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline]
#2: ffff8880308fcf18 (ptlock_ptr(ptdesc)#2){+.+.}-{2:2}, at: __pte_offset_map_lock+0x107/0x1e0 mm/pgtable-generic.c:375
#3: ffffffff8cd2fc60 (rcu_read_lock_sched){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:334 [inline]
#3: ffffffff8cd2fc60 (rcu_read_lock_sched){....}-{1:2}, at: rcu_read_lock_sched include/linux/rcupdate.h:878 [inline]
#3: ffffffff8cd2fc60 (rcu_read_lock_sched){....}-{1:2}, at: pfn_valid+0xcd/0x420 include/linux/mmzone.h:2011
#4: ffffc900001f0c00 ((&app->join_timer)#2){+.-.}-{0:0}, at: call_timer_fn+0xbf/0x530 kernel/time/timer.c:1697
#5: ffff8880b8f297d8 (&base->lock){-.-.}-{2:2}, at: lock_timer_base+0x123/0x270 kernel/time/timer.c:999
#6: ffffffff8cd2fba0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:334 [inline]
#6: ffffffff8cd2fba0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:786 [inline]
#6: ffffffff8cd2fba0 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2321 [inline]
#6: ffffffff8cd2fba0 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run3+0xf4/0x400 kernel/trace/bpf_trace.c:2362
stack backtrace:
CPU: 1 PID: 6298 Comm: syz.1.152 Not tainted 6.6.99-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/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_run3+0x1e7/0x400 kernel/trace/bpf_trace.c:2362
__bpf_trace_timer_start+0x14a/0x1b0 include/trace/events/timer.h:53
trace_timer_start include/trace/events/timer.h:53 [inline]
enqueue_timer+0x398/0x530 kernel/time/timer.c:609
internal_add_timer kernel/time/timer.c:634 [inline]
__mod_timer+0x977/0xdb0 kernel/time/timer.c:1131
call_timer_fn+0x16e/0x530 kernel/time/timer.c:1700
expire_timers kernel/time/timer.c:1751 [inline]
__run_timers+0x52d/0x7d0 kernel/time/timer.c:2022
run_timer_softirq+0x67/0xf0 kernel/time/timer.c:2035
handle_softirqs+0x280/0x820 kernel/softirq.c:578
__do_softirq kernel/softirq.c:612 [inline]
invoke_softirq kernel/softirq.c:452 [inline]
__irq_exit_rcu+0xc7/0x190 kernel/softirq.c:661
irq_exit_rcu+0x9/0x20 kernel/softirq.c:673
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1088 [inline]
sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1088
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:687
RIP: 0010:lock_acquire+0x1f2/0x410 kernel/locking/lockdep.c:5758
Code: 00 9c 8f 84 24 80 00 00 00 f6 84 24 81 00 00 00 02 0f 85 f5 00 00 00 41 f7 c6 00 02 00 00 74 01 fb 48 c7 44 24 60 0e 36 e0 45 <4b> c7 04 3c 00 00 00 00 66 43 c7 44 3c 09 00 00 43 c6 44 3c 0b 00
RSP: 0018:ffffc90003947320 EFLAGS: 00000206
RAX: 0000000000000001 RBX: 0000000000000000 RCX: 883880d99d6c8a00
RDX: 0000000000000000 RSI: ffffffff8aaacbc0 RDI: ffffffff8afc6680
RBP: ffffc90003947430 R08: dffffc0000000000 R09: 1ffffffff21b44a4
R10: dffffc0000000000 R11: fffffbfff21b44a5 R12: 1ffff92000728e70
R13: ffffffff8cd2fc60 R14: 0000000000000246 R15: dffffc0000000000
rcu_lock_acquire include/linux/rcupdate.h:334 [inline]
rcu_read_lock_sched include/linux/rcupdate.h:878 [inline]
pfn_valid+0xe9/0x420 include/linux/mmzone.h:2011
page_table_check_clear+0x1e/0x6a0 mm/page_table_check.c:70
ptep_get_and_clear_full arch/x86/include/asm/jump_label.h:-1 [inline]
zap_pte_range mm/memory.c:1428 [inline]
zap_pmd_range mm/memory.c:1570 [inline]
zap_pud_range mm/memory.c:1599 [inline]
zap_p4d_range mm/memory.c:1620 [inline]
unmap_page_range+0x1ad1/0x2fe0 mm/memory.c:1641
unmap_vmas+0x25e/0x3a0 mm/memory.c:1731
exit_mmap+0x200/0xb50 mm/mmap.c:3298
__mmput+0x118/0x3c0 kernel/fork.c:1355
exit_mm+0x1da/0x2c0 kernel/exit.c:569
do_exit+0x88e/0x23c0 kernel/exit.c:870
do_group_exit+0x21b/0x2d0 kernel/exit.c:1024
get_signal+0x12fc/0x1400 kernel/signal.c:2902
arch_do_signal_or_restart+0x96/0x780 arch/x86/kernel/signal.c:310
exit_to_user_mode_loop+0x70/0x110 kernel/entry/common.c:174
exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:210
__syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline]
syscall_exit_to_user_mode+0x1a/0x50 kernel/entry/common.c:302
do_syscall_64+0x61/0xb0 arch/x86/entry/common.c:87
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f100138e9a9
Code: Unable to access opcode bytes at 0x7f100138e97f.
RSP: 002b:00007f10021e40e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: fffffffffffffe00 RBX: 00007f10015b6088 RCX: 00007f100138e9a9
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f10015b6088
RBP: 00007f10015b6080 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f10015b608c
R13: 0000000000000000 R14: 00007ffd9c693c30 R15: 00007ffd9c693d18
----------------
Code disassembly (best guess):
0: 00 9c 8f 84 24 80 00 add %bl,0x802484(%rdi,%rcx,4)
7: 00 00 add %al,(%rax)
9: f6 84 24 81 00 00 00 testb $0x2,0x81(%rsp)
10: 02
11: 0f 85 f5 00 00 00 jne 0x10c
17: 41 f7 c6 00 02 00 00 test $0x200,%r14d
1e: 74 01 je 0x21
20: fb sti
21: 48 c7 44 24 60 0e 36 movq $0x45e0360e,0x60(%rsp)
28: e0 45
* 2a: 4b c7 04 3c 00 00 00 movq $0x0,(%r12,%r15,1) <-- trapping instruction
31: 00
32: 66 43 c7 44 3c 09 00 movw $0x0,0x9(%r12,%r15,1)
39: 00
3a: 43 c6 44 3c 0b 00 movb $0x0,0xb(%r12,%r15,1)