Skip to content

LoongArch: BPF: Fix uninitialized symbol 'retval_off' #9519

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: bpf-next_base
Choose a base branch
from

Conversation

kernel-patches-daemon-bpf[bot]
Copy link

Pull request for series with
subject: LoongArch: BPF: Fix uninitialized symbol 'retval_off'
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=992991

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: bf7a6a6
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=992991
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: b5bbbb7
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=992991
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 2693227
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=992991
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 78e097f
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=992991
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 21aeabb
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=992991
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 0780f54
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=992991
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: d47cc4d
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=992991
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 4223bf8
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=992991
version: 1

In __arch_prepare_bpf_trampoline(), retval_off is meaningful only when
save_ret is not 0, so the current logic is correct. But it may cause a
build warning:

arch/loongarch/net/bpf_jit.c:1547 __arch_prepare_bpf_trampoline() error: uninitialized symbol 'retval_off'.

So initialize retval_off unconditionally to fix it.

Fixes: f9b6b41 ("LoongArch: BPF: Add basic bpf trampoline support")
Closes: https://lore.kernel.org/r/[email protected]/
Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Huacai Chen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant