Commit 78d64ab
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 <[email protected]>
Reviewed-by: Pu Lehui <[email protected]>1 parent bfbc0ff commit 78d64ab
1 file changed
+2
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1079 | 1079 | | |
1080 | 1080 | | |
1081 | 1081 | | |
1082 | | - | |
| 1082 | + | |
1083 | 1083 | | |
1084 | | - | |
1085 | | - | |
| 1084 | + | |
1086 | 1085 | | |
1087 | 1086 | | |
1088 | 1087 | | |
| |||
0 commit comments