======================================================
WARNING: possible circular locking dependency detected
6.9.0-rc7-syzkaller-02062-g83eea61776c9 #0 Not tainted
------------------------------------------------------
syz-executor.1/16890 is trying to acquire lock:
ffff8880b9429430 (krc.lock){-.-.}-{2:2}, at: krc_this_cpu_lock kernel/rcu/tree.c:2960 [inline]
ffff8880b9429430 (krc.lock){-.-.}-{2:2}, at: add_ptr_to_bulk_krc_lock kernel/rcu/tree.c:3359 [inline]
ffff8880b9429430 (krc.lock){-.-.}-{2:2}, at: kvfree_call_rcu+0x18a/0x790 kernel/rcu/tree.c:3444
but task is already holding lock:
ffff8880b942c898 (hrtimer_bases.lock){-.-.}-{2:2}, at: __run_hrtimer kernel/time/hrtimer.c:1696 [inline]
ffff8880b942c898 (hrtimer_bases.lock){-.-.}-{2:2}, at: __hrtimer_run_queues+0x67a/0xd50 kernel/time/hrtimer.c:1756
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #1 (hrtimer_bases.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_hrtimer_base kernel/time/hrtimer.c:175 [inline]
hrtimer_start_range_ns+0xdf/0xc60 kernel/time/hrtimer.c:1303
hrtimer_start include/linux/hrtimer.h:275 [inline]
run_page_cache_worker kernel/rcu/tree.c:3341 [inline]
kvfree_call_rcu+0x5e6/0x790 kernel/rcu/tree.c:3446
rtnl_register_internal+0x482/0x590 net/core/rtnetlink.c:265
rtnl_register+0x36/0x80 net/core/rtnetlink.c:315
ip_rt_init+0x2f5/0x3a0 net/ipv4/route.c:3702
ip_init+0xe/0x20 net/ipv4/ip_output.c:1663
inet_init+0x3d8/0x580 net/ipv4/af_inet.c:1981
do_one_initcall+0x248/0x880 init/main.c:1245
do_initcall_level+0x157/0x210 init/main.c:1307
do_initcalls+0x3f/0x80 init/main.c:1323
kernel_init_freeable+0x435/0x5d0 init/main.c:1555
kernel_init+0x1d/0x2b0 init/main.c:1444
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+0x18cb/0x58e0 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:2960 [inline]
add_ptr_to_bulk_krc_lock kernel/rcu/tree.c:3359 [inline]
kvfree_call_rcu+0x18a/0x790 kernel/rcu/tree.c:3444
trie_delete_elem+0x546/0x6a0 kernel/bpf/lpm_trie.c:540
bpf_prog_1db1603a7cfa36fb+0x45/0x49
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_hrtimer_start include/trace/events/timer.h:222 [inline]
debug_activate kernel/time/hrtimer.c:479 [inline]
enqueue_hrtimer+0x35a/0x3c0 kernel/time/hrtimer.c:1090
__run_hrtimer kernel/time/hrtimer.c:1709 [inline]
__hrtimer_run_queues+0x6d5/0xd50 kernel/time/hrtimer.c:1756
hrtimer_interrupt+0x396/0x990 kernel/time/hrtimer.c:1818
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1032 [inline]
__sysvec_apic_timer_interrupt+0x110/0x3f0 arch/x86/kernel/apic/apic.c:1049
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline]
sysvec_apic_timer_interrupt+0xa1/0xc0 arch/x86/kernel/apic/apic.c:1043
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
__sanitizer_cov_trace_switch+0x90/0x120
backtrack_insn kernel/bpf/verifier.c:3673 [inline]
__mark_chain_precision+0x1d0f/0x7550 kernel/bpf/verifier.c:4269
mark_chain_precision kernel/bpf/verifier.c:4372 [inline]
check_cond_jmp_op+0x2594/0x3d90 kernel/bpf/verifier.c:15186
do_check+0x9bcf/0x10930 kernel/bpf/verifier.c:18073
do_check_common+0x14bd/0x1dd0 kernel/bpf/verifier.c:20835
do_check_main kernel/bpf/verifier.c:20926 [inline]
bpf_check+0x14222/0x192f0 kernel/bpf/verifier.c:21596
bpf_prog_load+0x1667/0x20f0 kernel/bpf/syscall.c:2908
__sys_bpf+0x4ee/0x810 kernel/bpf/syscall.c:5682
__do_sys_bpf kernel/bpf/syscall.c:5789 [inline]
__se_sys_bpf kernel/bpf/syscall.c:5787 [inline]
__x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:5787
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(hrtimer_bases.lock);
lock(krc.lock);
lock(hrtimer_bases.lock);
lock(krc.lock);
*** DEADLOCK ***
2 locks held by syz-executor.1/16890:
#0: ffff8880b942c898 (hrtimer_bases.lock){-.-.}-{2:2}, at: __run_hrtimer kernel/time/hrtimer.c:1696 [inline]
#0: ffff8880b942c898 (hrtimer_bases.lock){-.-.}-{2:2}, at: __hrtimer_run_queues+0x67a/0xd50 kernel/time/hrtimer.c:1756
#1: ffffffff8e334ea0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline]
#1: ffffffff8e334ea0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline]
#1: ffffffff8e334ea0 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2402 [inline]
#1: ffffffff8e334ea0 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1fc/0x540 kernel/trace/bpf_trace.c:2444
stack backtrace:
CPU: 0 PID: 16890 Comm: syz-executor.1 Not tainted 6.9.0-rc7-syzkaller-02062-g83eea61776c9 #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+0x18cb/0x58e0 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:2960 [inline]
add_ptr_to_bulk_krc_lock kernel/rcu/tree.c:3359 [inline]
kvfree_call_rcu+0x18a/0x790 kernel/rcu/tree.c:3444
trie_delete_elem+0x546/0x6a0 kernel/bpf/lpm_trie.c:540
bpf_prog_1db1603a7cfa36fb+0x45/0x49
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_hrtimer_start include/trace/events/timer.h:222 [inline]
debug_activate kernel/time/hrtimer.c:479 [inline]
enqueue_hrtimer+0x35a/0x3c0 kernel/time/hrtimer.c:1090
__run_hrtimer kernel/time/hrtimer.c:1709 [inline]
__hrtimer_run_queues+0x6d5/0xd50 kernel/time/hrtimer.c:1756
hrtimer_interrupt+0x396/0x990 kernel/time/hrtimer.c:1818
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1032 [inline]
__sysvec_apic_timer_interrupt+0x110/0x3f0 arch/x86/kernel/apic/apic.c:1049
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline]
sysvec_apic_timer_interrupt+0xa1/0xc0 arch/x86/kernel/apic/apic.c:1043
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:__sanitizer_cov_trace_switch+0x90/0x120 kernel/kcov.c:340
Code: 85 d2 75 14 e9 9a 00 00 00 41 b8 05 00 00 00 4d 85 d2 0f 84 8b 00 00 00 4c 8b 4c 24 20 65 4c 8b 1c 25 c0 d3 03 00 31 d2 eb 08 <48> ff c2 49 39 d2 74 71 4c 8b 74 d6 10 65 8b 05 64 ab 6d 7e a9 00
RSP: 0018:ffffc9000e5768b8 EFLAGS: 00000297
RAX: 0000000000000002 RBX: 0000000000000002 RCX: 0000000000040000
RDX: 0000000000000001 RSI: ffffffff8e3b0600 RDI: 0000000000000002
RBP: ffffc9000e576b30 R08: 0000000000000001 R09: ffffffff81a80f1f
R10: 0000000000000005 R11: ffff888028115a00 R12: 0000000000000000
R13: 0000000000000003 R14: 0000000000000002 R15: dffffc0000000000
backtrack_insn kernel/bpf/verifier.c:3673 [inline]
__mark_chain_precision+0x1d0f/0x7550 kernel/bpf/verifier.c:4269
mark_chain_precision kernel/bpf/verifier.c:4372 [inline]
check_cond_jmp_op+0x2594/0x3d90 kernel/bpf/verifier.c:15186
do_check+0x9bcf/0x10930 kernel/bpf/verifier.c:18073
do_check_common+0x14bd/0x1dd0 kernel/bpf/verifier.c:20835
do_check_main kernel/bpf/verifier.c:20926 [inline]
bpf_check+0x14222/0x192f0 kernel/bpf/verifier.c:21596
bpf_prog_load+0x1667/0x20f0 kernel/bpf/syscall.c:2908
__sys_bpf+0x4ee/0x810 kernel/bpf/syscall.c:5682
__do_sys_bpf kernel/bpf/syscall.c:5789 [inline]
__se_sys_bpf kernel/bpf/syscall.c:5787 [inline]
__x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:5787
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f891aa7cee9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f891b7770c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 00007f891ababf80 RCX: 00007f891aa7cee9
RDX: 0000000000000048 RSI: 0000000020000200 RDI: 0000000000000005
RBP: 00007f891aac949e R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000004d R14: 00007f891ababf80 R15: 00007ffc3e25df78
----------------
Code disassembly (best guess):
0: 85 d2 test %edx,%edx
2: 75 14 jne 0x18
4: e9 9a 00 00 00 jmp 0xa3
9: 41 b8 05 00 00 00 mov $0x5,%r8d
f: 4d 85 d2 test %r10,%r10
12: 0f 84 8b 00 00 00 je 0xa3
18: 4c 8b 4c 24 20 mov 0x20(%rsp),%r9
1d: 65 4c 8b 1c 25 c0 d3 mov %gs:0x3d3c0,%r11
24: 03 00
26: 31 d2 xor %edx,%edx
28: eb 08 jmp 0x32
* 2a: 48 ff c2 inc %rdx <-- trapping instruction
2d: 49 39 d2 cmp %rdx,%r10
30: 74 71 je 0xa3
32: 4c 8b 74 d6 10 mov 0x10(%rsi,%rdx,8),%r14
37: 65 8b 05 64 ab 6d 7e mov %gs:0x7e6dab64(%rip),%eax # 0x7e6daba2
3e: a9 .byte 0xa9