Commit 11ae737e authored by Amery Hung's avatar Amery Hung Committed by Jakub Kicinski
Browse files

selftests: drv-net: Reload pkt pointer after calling filter_udphdr



Fix a verification failure. filter_udphdr() calls bpf_xdp_pull_data(),
which will invalidate all pkt pointers. Therefore, all ctx->data loaded
before filter_udphdr() cannot be used. Reload it to prevent verification
errors.

The error may not appear on some compiler versions if they decide to
load ctx->data after filter_udphdr() when it is first used.

Fixes: efec2e55 ("selftests: drv-net: Pull data before parsing headers")
Signed-off-by: default avatarAmery Hung <ameryhung@gmail.com>
Acked-by: default avatarMartin KaFai Lau <martin.lau@kernel.org>
Link: https://patch.msgid.link/20250925161452.1290694-1-ameryhung@gmail.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent dd5629a6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment