aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/bpf/libbpf.c
diff options
context:
space:
mode:
authorAnton Protopopov <a.s.protopopov@gmail.com>2025-05-10 18:20:11 +0000
committerAndrii Nakryiko <andrii@kernel.org>2025-05-12 15:22:54 -0700
commitfd5fd538a1f4b34cee6823ba0ddda2f7a55aca96 (patch)
tree72801ead899ad1396711449b9b8606f050545779 /tools/lib/bpf/libbpf.c
parentselftests/bpf: Allow skipping docs compilation (diff)
downloadlinux-rng-fd5fd538a1f4b34cee6823ba0ddda2f7a55aca96.tar.xz
linux-rng-fd5fd538a1f4b34cee6823ba0ddda2f7a55aca96.zip
libbpf: Use proper errno value in nlattr
Return value of the validate_nla() function can be propagated all the way up to users of libbpf API. In case of error this libbpf version of validate_nla returns -1 which will be seen as -EPERM from user's point of view. Instead, return a more reasonable -EINVAL. Fixes: bbf48c18ee0c ("libbpf: add error reporting in XDP") Suggested-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Anton Protopopov <a.s.protopopov@gmail.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20250510182011.2246631-1-a.s.protopopov@gmail.com
Diffstat (limited to 'tools/lib/bpf/libbpf.c')
0 files changed, 0 insertions, 0 deletions