======================================================
WARNING: possible circular locking dependency detected
6.9.0-syzkaller-12111-gfbe3e8473f39 #0 Not tainted
------------------------------------------------------
syz-executor.0/11429 is trying to acquire lock:
ffff8880b9429430 (krc.lock){..-.}-{2:2}, at: krc_this_cpu_lock kernel/rcu/tree.c:3298 [inline]
ffff8880b9429430 (krc.lock){..-.}-{2:2}, at: add_ptr_to_bulk_krc_lock kernel/rcu/tree.c:3697 [inline]
ffff8880b9429430 (krc.lock){..-.}-{2:2}, at: kvfree_call_rcu+0x18a/0x790 kernel/rcu/tree.c:3782
but task is already holding lock:
ffff8880b942a718 (&base->lock){-.-.}-{2:2}, at: lock_timer_base+0x112/0x240 kernel/time/timer.c:1051
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #1 (&base->lock){-.-.}-{2:2}:
lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162
lock_timer_base+0x112/0x240 kernel/time/timer.c:1051
__mod_timer+0x1ca/0xeb0 kernel/time/timer.c:1132
queue_delayed_work_on+0x1ca/0x390 kernel/workqueue.c:2572
kvfree_call_rcu+0x47f/0x790 kernel/rcu/tree.c:3810
rtnl_register_internal+0x482/0x590 net/core/rtnetlink.c:265
rtnl_register+0x36/0x80 net/core/rtnetlink.c:315
ip_rt_init+0x2f6/0x3a0 net/ipv4/route.c:3702
ip_init+0xe/0x20 net/ipv4/ip_output.c:1667
inet_init+0x3d8/0x580 net/ipv4/af_inet.c:1983
do_one_initcall+0x248/0x880 init/main.c:1267
do_initcall_level+0x157/0x210 init/main.c:1329
do_initcalls+0x3f/0x80 init/main.c:1345
kernel_init_freeable+0x435/0x5d0 init/main.c:1578
kernel_init+0x1d/0x2b0 init/main.c:1467
ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
-> #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+0x18e0/0x5900 kernel/locking/lockdep.c:3869
__lock_acquire+0x1346/0x1fd0 kernel/locking/lockdep.c:5137
lock_acquire+0x1ed/0x550 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:3298 [inline]
add_ptr_to_bulk_krc_lock kernel/rcu/tree.c:3697 [inline]
kvfree_call_rcu+0x18a/0x790 kernel/rcu/tree.c:3782
trie_delete_elem+0x546/0x6a0 kernel/bpf/lpm_trie.c:540
bpf_prog_2c29ac5cdc6b1842+0x42/0x46
bpf_dispatcher_nop_func include/linux/bpf.h:1243 [inline]
__bpf_prog_run include/linux/filter.h:691 [inline]
bpf_prog_run include/linux/filter.h:698 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:2403 [inline]
bpf_trace_run2+0x2ec/0x540 kernel/trace/bpf_trace.c:2444
trace_timer_start include/trace/events/timer.h:52 [inline]
enqueue_timer+0x3ce/0x570 kernel/time/timer.c:663
internal_add_timer kernel/time/timer.c:688 [inline]
__mod_timer+0xa0e/0xeb0 kernel/time/timer.c:1183
mrp_join_timer_arm net/802/mrp.c:597 [inline]
mrp_join_timer+0x148/0x180 net/802/mrp.c:612
call_timer_fn+0x18e/0x650 kernel/time/timer.c:1792
expire_timers kernel/time/timer.c:1843 [inline]
__run_timers kernel/time/timer.c:2417 [inline]
__run_timer_base+0x66a/0x8e0 kernel/time/timer.c:2428
run_timer_base kernel/time/timer.c:2437 [inline]
run_timer_softirq+0xb7/0x170 kernel/time/timer.c:2447
handle_softirqs+0x2c4/0x970 kernel/softirq.c:554
__do_softirq kernel/softirq.c:588 [inline]
invoke_softirq kernel/softirq.c:428 [inline]
__irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637
irq_exit_rcu+0x9/0x30 kernel/softirq.c:649
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline]
sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1043
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
__tlb_remove_folio_pages_size+0x9/0x590 mm/mmu_gather.c:167
zap_present_folio_ptes mm/memory.c:1516 [inline]
zap_present_ptes mm/memory.c:1570 [inline]
zap_pte_range mm/memory.c:1612 [inline]
zap_pmd_range mm/memory.c:1730 [inline]
zap_pud_range mm/memory.c:1759 [inline]
zap_p4d_range mm/memory.c:1780 [inline]
unmap_page_range+0x1967/0x4d00 mm/memory.c:1801
unmap_vmas+0x3cc/0x5f0 mm/memory.c:1891
exit_mmap+0x264/0xc80 mm/mmap.c:3312
__mmput+0x115/0x3c0 kernel/fork.c:1346
exit_mm+0x220/0x310 kernel/exit.c:565
do_exit+0x9aa/0x27e0 kernel/exit.c:861
do_group_exit+0x207/0x2c0 kernel/exit.c:1023
get_signal+0x16a1/0x1740 kernel/signal.c:2909
arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:310
exit_to_user_mode_loop kernel/entry/common.c:111 [inline]
exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
__syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
syscall_exit_to_user_mode+0xc9/0x370 kernel/entry/common.c:218
do_syscall_64+0x100/0x230 arch/x86/entry/common.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f
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-executor.0/11429:
#0: ffff88807b147398 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_lock include/linux/mmap_lock.h:144 [inline]
#0: ffff88807b147398 (&mm->mmap_lock){++++}-{3:3}, at: exit_mmap+0x159/0xc80 mm/mmap.c:3296
#1: ffffffff8e333e60 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline]
#1: ffffffff8e333e60 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline]
#1: ffffffff8e333e60 (rcu_read_lock){....}-{1:2}, at: __pte_offset_map+0x82/0x380 mm/pgtable-generic.c:287
#2: ffff8880719f5018 (ptlock_ptr(ptdesc)#2){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline]
#2: ffff8880719f5018 (ptlock_ptr(ptdesc)#2){+.+.}-{2:2}, at: __pte_offset_map_lock+0x1ba/0x300 mm/pgtable-generic.c:375
#3: ffffc90000007c00 ((&app->join_timer)){+.-.}-{0:0}, at: call_timer_fn+0xc0/0x650 kernel/time/timer.c:1789
#4: ffff88802b1a78c8 (&app->lock){+.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline]
#4: ffff88802b1a78c8 (&app->lock){+.-.}-{2:2}, at: mrp_join_timer+0xce/0x180 net/802/mrp.c:610
#5: ffff8880b942a718 (&base->lock){-.-.}-{2:2}, at: lock_timer_base+0x112/0x240 kernel/time/timer.c:1051
#6: ffffffff8e333e60 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline]
#6: ffffffff8e333e60 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline]
#6: ffffffff8e333e60 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2402 [inline]
#6: ffffffff8e333e60 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1fc/0x540 kernel/trace/bpf_trace.c:2444
stack backtrace:
CPU: 0 PID: 11429 Comm: syz-executor.0 Not tainted 6.9.0-syzkaller-12111-gfbe3e8473f39 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114
check_noncircular+0x36a/0x4a0 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+0x18e0/0x5900 kernel/locking/lockdep.c:3869
__lock_acquire+0x1346/0x1fd0 kernel/locking/lockdep.c:5137
lock_acquire+0x1ed/0x550 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:3298 [inline]
add_ptr_to_bulk_krc_lock kernel/rcu/tree.c:3697 [inline]
kvfree_call_rcu+0x18a/0x790 kernel/rcu/tree.c:3782
trie_delete_elem+0x546/0x6a0 kernel/bpf/lpm_trie.c:540
bpf_prog_2c29ac5cdc6b1842+0x42/0x46
bpf_dispatcher_nop_func include/linux/bpf.h:1243 [inline]
__bpf_prog_run include/linux/filter.h:691 [inline]
bpf_prog_run include/linux/filter.h:698 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:2403 [inline]
bpf_trace_run2+0x2ec/0x540 kernel/trace/bpf_trace.c:2444
trace_timer_start include/trace/events/timer.h:52 [inline]
enqueue_timer+0x3ce/0x570 kernel/time/timer.c:663
internal_add_timer kernel/time/timer.c:688 [inline]
__mod_timer+0xa0e/0xeb0 kernel/time/timer.c:1183
mrp_join_timer_arm net/802/mrp.c:597 [inline]
mrp_join_timer+0x148/0x180 net/802/mrp.c:612
call_timer_fn+0x18e/0x650 kernel/time/timer.c:1792
expire_timers kernel/time/timer.c:1843 [inline]
__run_timers kernel/time/timer.c:2417 [inline]
__run_timer_base+0x66a/0x8e0 kernel/time/timer.c:2428
run_timer_base kernel/time/timer.c:2437 [inline]
run_timer_softirq+0xb7/0x170 kernel/time/timer.c:2447
handle_softirqs+0x2c4/0x970 kernel/softirq.c:554
__do_softirq kernel/softirq.c:588 [inline]
invoke_softirq kernel/softirq.c:428 [inline]
__irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637
irq_exit_rcu+0x9/0x30 kernel/softirq.c:649
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline]
sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1043
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:__tlb_remove_folio_pages_size+0x9/0x590 mm/mmu_gather.c:167
Code: 89 de 44 89 fa 44 89 f1 5b 41 5e 41 5f 5d eb 11 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 55 41 57 41 56 41 55 41 54 <53> 48 83 ec 30 41 89 cf 41 89 d5 48 89 74 24 08 48 89 fd 49 be 00
RSP: 0018:ffffc900128472d0 EFLAGS: 00000293
RAX: ffffffff81e8ab0b RBX: ffffffffffffffff RCX: 0000000000000001
RDX: 0000000000000001 RSI: ffffea0001e6c7c0 RDI: ffffc90012847860
RBP: ffffc90012847650 R08: ffffffff81423561 R09: 1ffffd40003cd8f8
R10: dffffc0000000000 R11: fffff940003cd8f9 R12: ffffea0001e6c7c0
R13: ffffc900128475a0 R14: 0400000000000040 R15: 000000000b414a01
zap_present_folio_ptes mm/memory.c:1516 [inline]
zap_present_ptes mm/memory.c:1570 [inline]
zap_pte_range mm/memory.c:1612 [inline]
zap_pmd_range mm/memory.c:1730 [inline]
zap_pud_range mm/memory.c:1759 [inline]
zap_p4d_range mm/memory.c:1780 [inline]
unmap_page_range+0x1967/0x4d00 mm/memory.c:1801
unmap_vmas+0x3cc/0x5f0 mm/memory.c:1891
exit_mmap+0x264/0xc80 mm/mmap.c:3312
__mmput+0x115/0x3c0 kernel/fork.c:1346
exit_mm+0x220/0x310 kernel/exit.c:565
do_exit+0x9aa/0x27e0 kernel/exit.c:861
do_group_exit+0x207/0x2c0 kernel/exit.c:1023
get_signal+0x16a1/0x1740 kernel/signal.c:2909
arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:310
exit_to_user_mode_loop kernel/entry/common.c:111 [inline]
exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
__syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
syscall_exit_to_user_mode+0xc9/0x370 kernel/entry/common.c:218
do_syscall_64+0x100/0x230 arch/x86/entry/common.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f54d1a7cee9
Code: Unable to access opcode bytes at 0x7f54d1a7cebf.
RSP: 002b:00007f54d27ba178 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: fffffffffffffe00 RBX: 00007f54d1bb3fa8 RCX: 00007f54d1a7cee9
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f54d1bb3fa8
RBP: 00007f54d1bb3fa0 R08: 00007f54d27ba6c0 R09: 00007f54d27ba6c0
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f54d1bb3fac
R13: 000000000000000b R14: 00007ffc9ead7b60 R15: 00007ffc9ead7c48
----------------
Code disassembly (best guess):
0: 89 de mov %ebx,%esi
2: 44 89 fa mov %r15d,%edx
5: 44 89 f1 mov %r14d,%ecx
8: 5b pop %rbx
9: 41 5e pop %r14
b: 41 5f pop %r15
d: 5d pop %rbp
e: eb 11 jmp 0x21
10: 90 nop
11: 90 nop
12: 90 nop
13: 90 nop
14: 90 nop
15: 90 nop
16: 90 nop
17: 90 nop
18: 90 nop
19: 90 nop
1a: 90 nop
1b: 90 nop
1c: 90 nop
1d: 90 nop
1e: 90 nop
1f: 90 nop
20: 90 nop
21: 55 push %rbp
22: 41 57 push %r15
24: 41 56 push %r14
26: 41 55 push %r13
28: 41 54 push %r12
* 2a: 53 push %rbx <-- trapping instruction
2b: 48 83 ec 30 sub $0x30,%rsp
2f: 41 89 cf mov %ecx,%r15d
32: 41 89 d5 mov %edx,%r13d
35: 48 89 74 24 08 mov %rsi,0x8(%rsp)
3a: 48 89 fd mov %rdi,%rbp
3d: 49 rex.WB
3e: be .byte 0xbe