Commit c9110e6f authored by Ricardo B. Marlière's avatar Ricardo B. Marlière Committed by Andrii Nakryiko
Browse files

selftests/bpf: Fix count write in testapp_xdp_metadata_copy()



Commit 4b302092 ("selftests/xsk: Add tail adjustment tests and support
check") added a new global to xsk_xdp_progs.c, but left out the access in
the testapp_xdp_metadata_copy() function. Since bpf_map_update_elem() will
write to the whole bss section, it gets truncated. Fix by writing to
skel_rx->bss->count directly.

Fixes: 4b302092 ("selftests/xsk: Add tail adjustment tests and support check")
Signed-off-by: default avatarRicardo B. Marlière <rbm@suse.com>
Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20250829-selftests-bpf-xsk_regression_fix-v1-1-5f5acdb9fe6b@suse.com
parent 2a912258
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment