diff options
author | Chenghao Duan <duanchenghao@kylinos.cn> | 2025-09-22 14:22:44 +0800 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2025-09-23 12:29:03 -0700 |
commit | d0bf7cd5df18466d969bb60e8890b74cf96081ca (patch) | |
tree | 3027e3b88f37370f16491fea402eafa03338d5b2 /rust/helpers/vmalloc.c | |
parent | 0d3bf643b41bc339a02562a4aa382542d046bd0a (diff) |
riscv: bpf: Fix uninitialized symbol 'retval_off'
In the __arch_prepare_bpf_trampoline() function, retval_off is only
meaningful when save_ret is true, so the current logic is correct.
However, in the original logic, retval_off is only initialized under
certain conditions; for example, in the fmod_ret logic, the compiler is
not aware that the flags of the fmod_ret program (prog) have set
BPF_TRAMP_F_CALL_ORIG, which results in an uninitialized symbol
compilation warning.
So initialize retval_off unconditionally to fix it.
Signed-off-by: Chenghao Duan <duanchenghao@kylinos.cn>
Reviewed-by: Pu Lehui <pulehui@huawei.com>
Link: https://lore.kernel.org/r/20250922062244.822937-2-duanchenghao@kylinos.cn
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'rust/helpers/vmalloc.c')
0 files changed, 0 insertions, 0 deletions