======================================================
WARNING: possible circular locking dependency detected
6.1.110-syzkaller #0 Not tainted
------------------------------------------------------
syz.1.151/4072 is trying to acquire lock:
ffff8880b8e28118 (krc.lock){..-.}-{2:2}, at: krc_this_cpu_lock kernel/rcu/tree.c:2991 [inline]
ffff8880b8e28118 (krc.lock){..-.}-{2:2}, at: add_ptr_to_bulk_krc_lock kernel/rcu/tree.c:3311 [inline]
ffff8880b8e28118 (krc.lock){..-.}-{2:2}, at: kvfree_call_rcu+0x1b2/0x8c0 kernel/rcu/tree.c:3402
but task is already holding lock:
ffff8880b8e28358 (&base->lock){-.-.}-{2:2}, at: lock_timer_base+0x120/0x260 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}:
lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0xd1/0x120 kernel/locking/spinlock.c:162
lock_timer_base+0x120/0x260 kernel/time/timer.c:999
__mod_timer+0x1cb/0xee0 kernel/time/timer.c:1072
queue_delayed_work_on+0x156/0x250 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+0x520/0x8c0 kernel/rcu/tree.c:3428
rtnl_register_internal+0x489/0x580 net/core/rtnetlink.c:260
rtnl_register+0x32/0x70 net/core/rtnetlink.c:310
ip_rt_init+0x335/0x3c7 net/ipv4/route.c:3763
ip_init+0xa/0x14 net/ipv4/ip_output.c:1767
inet_init+0x2ae/0x3c0 net/ipv4/af_inet.c:2035
do_one_initcall+0x265/0x8f0 init/main.c:1298
do_initcall_level+0x157/0x207 init/main.c:1371
do_initcalls+0x49/0x86 init/main.c:1387
kernel_init_freeable+0x45c/0x60f init/main.c:1626
kernel_init+0x19/0x290 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+0x1661/0x5950 kernel/locking/lockdep.c:3825
__lock_acquire+0x125b/0x1f80 kernel/locking/lockdep.c:5049
lock_acquire+0x1f8/0x5a0 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+0x1b2/0x8c0 kernel/rcu/tree.c:3402
trie_delete_elem+0x53a/0x690 kernel/bpf/lpm_trie.c:532
bpf_prog_1db1603a7cfa36fb+0x3d/0x41
bpf_dispatcher_nop_func include/linux/bpf.h:989 [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:2273 [inline]
bpf_trace_run3+0x231/0x440 kernel/trace/bpf_trace.c:2313
trace_timer_start include/trace/events/timer.h:53 [inline]
enqueue_timer+0x440/0x600 kernel/time/timer.c:609
__mod_timer+0x92b/0xee0
call_timer_fn+0x1ad/0x6b0 kernel/time/timer.c:1504
expire_timers kernel/time/timer.c:1549 [inline]
__run_timers+0x67c/0x890 kernel/time/timer.c:1820
run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1833
handle_softirqs+0x2ee/0xa40 kernel/softirq.c:571
__do_softirq kernel/softirq.c:605 [inline]
invoke_softirq kernel/softirq.c:445 [inline]
__irq_exit_rcu+0x157/0x240 kernel/softirq.c:654
irq_exit_rcu+0x5/0x20 kernel/softirq.c:666
sysvec_apic_timer_interrupt+0x91/0xb0 arch/x86/kernel/apic/apic.c:1106
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:653
vm_normal_page+0x85/0x1d0 mm/memory.c:662
zap_pte_range mm/memory.c:1432 [inline]
zap_pmd_range mm/memory.c:1574 [inline]
zap_pud_range mm/memory.c:1603 [inline]
zap_p4d_range mm/memory.c:1624 [inline]
unmap_page_range+0xbac/0x2740 mm/memory.c:1645
unmap_vmas+0x48b/0x640 mm/memory.c:1730
exit_mmap+0x252/0x9f0 mm/mmap.c:3227
__mmput+0x115/0x3c0 kernel/fork.c:1199
exit_mm+0x226/0x300 kernel/exit.c:565
do_exit+0x9f6/0x26a0 kernel/exit.c:858
do_group_exit+0x202/0x2b0 kernel/exit.c:1021
get_signal+0x16f7/0x17d0 kernel/signal.c:2870
arch_do_signal_or_restart+0xb0/0x1a10 arch/x86/kernel/signal.c:871
exit_to_user_mode_loop+0x6a/0x100 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:292 [inline]
syscall_exit_to_user_mode+0x60/0x270 kernel/entry/common.c:303
do_syscall_64+0x47/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 ***
5 locks held by syz.1.151/4072:
#0: ffff88801f332e58 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_lock include/linux/mmap_lock.h:117 [inline]
#0: ffff88801f332e58 (&mm->mmap_lock){++++}-{3:3}, at: exit_mmap+0x1bb/0x9f0 mm/mmap.c:3212
#1: ffff888077d31d38 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline]
#1: ffff888077d31d38 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: zap_pte_range mm/memory.c:1417 [inline]
#1: ffff888077d31d38 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: zap_pmd_range mm/memory.c:1574 [inline]
#1: ffff888077d31d38 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: zap_pud_range mm/memory.c:1603 [inline]
#1: ffff888077d31d38 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: zap_p4d_range mm/memory.c:1624 [inline]
#1: ffff888077d31d38 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: unmap_page_range+0xacc/0x2740 mm/memory.c:1645
#2: ffffc90000007bc0 ((&ipvs->est_timer)){+.-.}-{0:0}, at: call_timer_fn+0xc2/0x6b0 kernel/time/timer.c:1501
#3: ffff8880b8e28358 (&base->lock){-.-.}-{2:2}, at: lock_timer_base+0x120/0x260 kernel/time/timer.c:999
#4: ffffffff8d32b000 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
#4: ffffffff8d32b000 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline]
#4: ffffffff8d32b000 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2272 [inline]
#4: ffffffff8d32b000 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run3+0x146/0x440 kernel/trace/bpf_trace.c:2313
stack backtrace:
CPU: 0 PID: 4072 Comm: syz.1.151 Not tainted 6.1.110-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
check_noncircular+0x2fa/0x3b0 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+0x1661/0x5950 kernel/locking/lockdep.c:3825
__lock_acquire+0x125b/0x1f80 kernel/locking/lockdep.c:5049
lock_acquire+0x1f8/0x5a0 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+0x1b2/0x8c0 kernel/rcu/tree.c:3402
trie_delete_elem+0x53a/0x690 kernel/bpf/lpm_trie.c:532
bpf_prog_1db1603a7cfa36fb+0x3d/0x41
bpf_dispatcher_nop_func include/linux/bpf.h:989 [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:2273 [inline]
bpf_trace_run3+0x231/0x440 kernel/trace/bpf_trace.c:2313
trace_timer_start include/trace/events/timer.h:53 [inline]
enqueue_timer+0x440/0x600 kernel/time/timer.c:609
__mod_timer+0x92b/0xee0
call_timer_fn+0x1ad/0x6b0 kernel/time/timer.c:1504
expire_timers kernel/time/timer.c:1549 [inline]
__run_timers+0x67c/0x890 kernel/time/timer.c:1820
run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1833
handle_softirqs+0x2ee/0xa40 kernel/softirq.c:571
__do_softirq kernel/softirq.c:605 [inline]
invoke_softirq kernel/softirq.c:445 [inline]
__irq_exit_rcu+0x157/0x240 kernel/softirq.c:654
irq_exit_rcu+0x5/0x20 kernel/softirq.c:666
sysvec_apic_timer_interrupt+0x91/0xb0 arch/x86/kernel/apic/apic.c:1106
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:653
RIP: 0010:vm_normal_page+0x85/0x1d0 mm/memory.c:662
Code: 81 e6 00 02 00 00 31 ff e8 28 ba be ff 4c 89 e0 48 25 00 02 00 00 75 3f 48 8b 1d b6 f4 cd 0c 4c 89 ef 48 89 de e8 0b b8 be ff <49> 39 dd 0f 87 8d 00 00 00 e8 1d b6 be ff 49 c1 e5 06 48 bb 00 00
RSP: 0018:ffffc9000aa172e8 EFLAGS: 00000293
RAX: 0000000000000000 RBX: 000000000023ffff RCX: ffff88802b803b80
RDX: 0000000000000000 RSI: 000000000023ffff RDI: 0000000000062137
RBP: ffffc9000aa17501 R08: ffffffff81cbf915 R09: ffffed1005700771
R10: 0000000000000000 R11: dffffc0000000001 R12: 8000000062137007
R13: 0000000000062137 R14: 00007f28b7d7a000 R15: ffff88807608b5e8
zap_pte_range mm/memory.c:1432 [inline]
zap_pmd_range mm/memory.c:1574 [inline]
zap_pud_range mm/memory.c:1603 [inline]
zap_p4d_range mm/memory.c:1624 [inline]
unmap_page_range+0xbac/0x2740 mm/memory.c:1645
unmap_vmas+0x48b/0x640 mm/memory.c:1730
exit_mmap+0x252/0x9f0 mm/mmap.c:3227
__mmput+0x115/0x3c0 kernel/fork.c:1199
exit_mm+0x226/0x300 kernel/exit.c:565
do_exit+0x9f6/0x26a0 kernel/exit.c:858
do_group_exit+0x202/0x2b0 kernel/exit.c:1021
get_signal+0x16f7/0x17d0 kernel/signal.c:2870
arch_do_signal_or_restart+0xb0/0x1a10 arch/x86/kernel/signal.c:871
exit_to_user_mode_loop+0x6a/0x100 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:292 [inline]
syscall_exit_to_user_mode+0x60/0x270 kernel/entry/common.c:303
do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:87
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f28b8d7def9
Code: Unable to access opcode bytes at 0x7f28b8d7decf.
RSP: 002b:00007f28b8bff0e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: 0000000000000001 RBX: 00007f28b8f35f88 RCX: 00007f28b8d7def9
RDX: 00000000000f4240 RSI: 0000000000000081 RDI: 00007f28b8f35f8c
RBP: 00007f28b8f35f80 R08: 0000000000000010 R09: 0000000000000000
R10: 0000000000000012 R11: 0000000000000246 R12: 00007f28b8f35f8c
R13: 0000000000000000 R14: 00007fff7925ed80 R15: 00007fff7925ee68
----------------
Code disassembly (best guess):
0: 81 e6 00 02 00 00 and $0x200,%esi
6: 31 ff xor %edi,%edi
8: e8 28 ba be ff call 0xffbeba35
d: 4c 89 e0 mov %r12,%rax
10: 48 25 00 02 00 00 and $0x200,%rax
16: 75 3f jne 0x57
18: 48 8b 1d b6 f4 cd 0c mov 0xccdf4b6(%rip),%rbx # 0xccdf4d5
1f: 4c 89 ef mov %r13,%rdi
22: 48 89 de mov %rbx,%rsi
25: e8 0b b8 be ff call 0xffbeb835
* 2a: 49 39 dd cmp %rbx,%r13 <-- trapping instruction
2d: 0f 87 8d 00 00 00 ja 0xc0
33: e8 1d b6 be ff call 0xffbeb655
38: 49 c1 e5 06 shl $0x6,%r13
3c: 48 rex.W
3d: bb .byte 0xbb