Commit cb4b9369 authored by Jonathan Wiepert's avatar Jonathan Wiepert Committed by Greg Kroah-Hartman
Browse files

Use thread-safe function pointer in libbpf_print



[ Upstream commit 91dbac40 ]

This patch fixes a thread safety bug where libbpf_print uses the
global variable storing the print function pointer rather than the local
variable that had the print function set via __atomic_load_n.

Fixes: f1cb927c ("libbpf: Ensure print callback usage is thread-safe")
Signed-off-by: default avatarJonathan Wiepert <jonathan.wiepert@gmail.com>
Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Acked-by: default avatarMykyta Yatsenko <mykyta.yatsenko5@gmail.com>
Link: https://lore.kernel.org/bpf/20250424221457.793068-1-jonathan.wiepert@gmail.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 79669fac
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment