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:Jonathan Wiepert <jonathan.wiepert@gmail.com> Signed-off-by:
Andrii Nakryiko <andrii@kernel.org> Acked-by:
Mykyta Yatsenko <mykyta.yatsenko5@gmail.com> Link: https://lore.kernel.org/bpf/20250424221457.793068-1-jonathan.wiepert@gmail.com Signed-off-by:
Sasha Levin <sashal@kernel.org>
Loading