======================================================
WARNING: possible circular locking dependency detected
6.1.121-syzkaller #0 Tainted: G W
------------------------------------------------------
modprobe/15533 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:1770
inet_init+0x2ae/0x3c0 net/ipv4/af_inet.c:2033
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:545
bpf_prog_2c29ac5cdc6b1842+0x3a/0x3e
bpf_dispatcher_nop_func include/linux/bpf.h:992 [inline]
__bpf_prog_run include/linux/filter.h:596 [inline]
bpf_prog_run include/linux/filter.h:610 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:2284 [inline]
bpf_trace_run3+0x3a1/0x440 kernel/trace/bpf_trace.c:2324
trace_timer_start include/trace/events/timer.h:53 [inline]
enqueue_timer+0x440/0x600 kernel/time/timer.c:609
__mod_timer+0x92b/0xee0
dsp_cmx_send+0x21bb/0x2240 drivers/isdn/mISDN/dsp_cmx.c:1850
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
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1118 [inline]
sysvec_apic_timer_interrupt+0xa0/0xc0 arch/x86/kernel/apic/apic.c:1118
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:691
PageTail include/linux/page-flags.h:292 [inline]
folio_flags include/linux/page-flags.h:319 [inline]
folio_test_workingset include/linux/page-flags.h:485 [inline]
folio_inc_refs mm/swap.c:436 [inline]
folio_mark_accessed+0x282/0x1c90 mm/swap.c:470
zap_pte_range mm/memory.c:1450 [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+0x1143/0x2740 mm/memory.c:1645
unmap_vmas+0x48b/0x640 mm/memory.c:1730
exit_mmap+0x249/0x980 mm/mmap.c:3238
__mmput+0x115/0x3c0 kernel/fork.c:1200
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
__do_sys_exit_group kernel/exit.c:1032 [inline]
__se_sys_exit_group kernel/exit.c:1030 [inline]
__x64_sys_exit_group+0x3b/0x40 kernel/exit.c:1030
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
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 ***
6 locks held by modprobe/15533:
#0: ffff8880293ac4d8 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_lock include/linux/mmap_lock.h:117 [inline]
#0: ffff8880293ac4d8 (&mm->mmap_lock){++++}-{3:3}, at: exit_mmap+0x1b6/0x980 mm/mmap.c:3223
#1: ffff888056ac16d8 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline]
#1: ffff888056ac16d8 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: zap_pte_range mm/memory.c:1417 [inline]
#1: ffff888056ac16d8 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: zap_pmd_range mm/memory.c:1574 [inline]
#1: ffff888056ac16d8 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: zap_pud_range mm/memory.c:1603 [inline]
#1: ffff888056ac16d8 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: zap_p4d_range mm/memory.c:1624 [inline]
#1: ffff888056ac16d8 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: unmap_page_range+0xacc/0x2740 mm/memory.c:1645
#2: ffffc90000007bc0 ((&dsp_spl_tl)){+.-.}-{0:0}, at: call_timer_fn+0xc2/0x6b0 kernel/time/timer.c:1501
#3: ffffffff8e2a5678 (dsp_lock){..-.}-{2:2}, at: dsp_cmx_send+0x22/0x2240 drivers/isdn/mISDN/dsp_cmx.c:1643
#4: ffff8880b8e28358 (&base->lock){-.-.}-{2:2}, at: lock_timer_base+0x120/0x260 kernel/time/timer.c:999
#5: ffffffff8d32b080 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
#5: ffffffff8d32b080 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline]
#5: ffffffff8d32b080 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2283 [inline]
#5: ffffffff8d32b080 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run3+0x146/0x440 kernel/trace/bpf_trace.c:2324
stack backtrace:
CPU: 0 PID: 15533 Comm: modprobe Tainted: G W 6.1.121-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/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:545
bpf_prog_2c29ac5cdc6b1842+0x3a/0x3e
bpf_dispatcher_nop_func include/linux/bpf.h:992 [inline]
__bpf_prog_run include/linux/filter.h:596 [inline]
bpf_prog_run include/linux/filter.h:610 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:2284 [inline]
bpf_trace_run3+0x3a1/0x440 kernel/trace/bpf_trace.c:2324
trace_timer_start include/trace/events/timer.h:53 [inline]
enqueue_timer+0x440/0x600 kernel/time/timer.c:609
__mod_timer+0x92b/0xee0
dsp_cmx_send+0x21bb/0x2240 drivers/isdn/mISDN/dsp_cmx.c:1850
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
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1118 [inline]
sysvec_apic_timer_interrupt+0xa0/0xc0 arch/x86/kernel/apic/apic.c:1118
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:691
RIP: 0010:arch_static_branch arch/x86/include/asm/jump_label.h:27 [inline]
RIP: 0010:page_fixed_fake_head include/linux/page-flags.h:216 [inline]
RIP: 0010:page_is_fake_head include/linux/page-flags.h:248 [inline]
RIP: 0010:PageTail include/linux/page-flags.h:292 [inline]
RIP: 0010:folio_flags include/linux/page-flags.h:319 [inline]
RIP: 0010:folio_test_workingset include/linux/page-flags.h:485 [inline]
RIP: 0010:folio_inc_refs mm/swap.c:436 [inline]
RIP: 0010:folio_mark_accessed+0x282/0x1c90 mm/swap.c:470
Code: 28 00 00 00 48 3b 84 24 80 00 00 00 0f 85 22 03 00 00 48 8d 65 d8 5b 41 5c 41 5d 41 5e 41 5f 5d c3 48 85 db 0f 85 22 06 00 00 <0f> 1f 44 00 00 e8 04 5b ce ff 48 8b 5c 24 10 48 89 df be 08 00 00
RSP: 0018:ffffc9000d28f620 EFLAGS: 00000246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff88802cdfd940
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc9000d28f6f0 R08: ffffffff81bc40de R09: fffff940003ff7a1
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffffd40003ff7a0
R13: 0000000000000002 R14: 1ffffd40003ff7a1 R15: ffffea0001ffbd08
zap_pte_range mm/memory.c:1450 [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+0x1143/0x2740 mm/memory.c:1645
unmap_vmas+0x48b/0x640 mm/memory.c:1730
exit_mmap+0x249/0x980 mm/mmap.c:3238
__mmput+0x115/0x3c0 kernel/fork.c:1200
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
__do_sys_exit_group kernel/exit.c:1032 [inline]
__se_sys_exit_group kernel/exit.c:1030 [inline]
__x64_sys_exit_group+0x3b/0x40 kernel/exit.c:1030
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f1e86ce8a90
Code: Unable to access opcode bytes at 0x7f1e86ce8a66.
RSP: 002b:00007fff92942de8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 00007f1e86dd9860 RCX: 00007f1e86ce8a90
RDX: 00000000000000e7 RSI: 000000000000003c RDI: 0000000000000001
RBP: 00007f1e86dd9860 R08: 00007fff92942c60 R09: 00007fff92942d40
R10: 00007fff92942ca0 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000001 R14: 00007f1e86ddd658 R15: 0000000000000001
----------------
Code disassembly (best guess):
0: 28 00 sub %al,(%rax)
2: 00 00 add %al,(%rax)
4: 48 3b 84 24 80 00 00 cmp 0x80(%rsp),%rax
b: 00
c: 0f 85 22 03 00 00 jne 0x334
12: 48 8d 65 d8 lea -0x28(%rbp),%rsp
16: 5b pop %rbx
17: 41 5c pop %r12
19: 41 5d pop %r13
1b: 41 5e pop %r14
1d: 41 5f pop %r15
1f: 5d pop %rbp
20: c3 ret
21: 48 85 db test %rbx,%rbx
24: 0f 85 22 06 00 00 jne 0x64c
* 2a: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) <-- trapping instruction
2f: e8 04 5b ce ff call 0xffce5b38
34: 48 8b 5c 24 10 mov 0x10(%rsp),%rbx
39: 48 89 df mov %rbx,%rdi
3c: be .byte 0xbe
3d: 08 00 or %al,(%rax)