Skip to content

Conversation

@kernel-patches-daemon-bpf-rc
Copy link

Pull request for series with
subject: libbpf: avoid possible use of uninitialized mod_len
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=986676

@kernel-patches-daemon-bpf-rc
Copy link
Author

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

@kernel-patches-daemon-bpf-rc
Copy link
Author

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

@kernel-patches-daemon-bpf-rc
Copy link
Author

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

If not fn_name, mod_len does never get initialized which fails now with
gcc15 on Alpine Linux edge:

	libbpf.c: In function 'find_kernel_btf_id.constprop':
	libbpf.c:10100:33: error: 'mod_len' may be used uninitialized [-Werror=maybe-uninitialized]
	10100 |                 if (mod_name && strncmp(mod->name, mod_name, mod_len) != 0)
	      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	libbpf.c:10070:21: note: 'mod_len' was declared here
	10070 |         int ret, i, mod_len;
	      |                     ^~~~~~~

Fixes: 8f8a024 ("libbpf: support "module: Function" syntax for tracing programs")
Signed-off-by: Achill Gilgenast <[email protected]>
Acked-by: Yonghong Song <[email protected]>
Acked-by: Eduard Zingerman <[email protected]>
@kernel-patches-daemon-bpf-rc
Copy link
Author

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

@kernel-patches-daemon-bpf-rc
Copy link
Author

At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=986676 irrelevant now. Closing PR.

@kernel-patches-daemon-bpf-rc kernel-patches-daemon-bpf-rc bot deleted the series/986676=>bpf-next branch August 1, 2025 01:37
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.

2 participants