Commit ce1da225 authored by Anton Protopopov's avatar Anton Protopopov Committed by Greg Kroah-Hartman
Browse files

libbpf: Use proper errno value in nlattr



[ Upstream commit fd5fd538 ]

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: bbf48c18 ("libbpf: add error reporting in XDP")
Suggested-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Signed-off-by: default avatarAnton Protopopov <a.s.protopopov@gmail.com>
Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20250510182011.2246631-1-a.s.protopopov@gmail.com


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