diff options
author | Anton Protopopov <a.s.protopopov@gmail.com> | 2025-04-30 12:08:20 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-06-19 15:31:45 +0200 |
commit | 277f9ffe873a76be46ddda3c59addfe16dab5bec (patch) | |
tree | 5f62ed9ea0a150a856242f34e0dbde290be94094 /kernel/bpf/core.c | |
parent | 6589bc3699bcb45b35b3095c44a5af7a4d75ef7e (diff) |
libbpf: Use proper errno value in linker
[ Upstream commit 358b1c0f56ebb6996fcec7dcdcf6bae5dcbc8b6c ]
Return values of the linker_append_sec_data() and the
linker_append_elf_relos() functions are propagated all the
way up to users of libbpf API. In some error cases these
functions return -1 which will be seen as -EPERM from user's
point of view. Instead, return a more reasonable -EINVAL.
Fixes: faf6ed321cf6 ("libbpf: Add BPF static linker APIs")
Signed-off-by: Anton Protopopov <a.s.protopopov@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20250430120820.2262053-1-a.s.protopopov@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'kernel/bpf/core.c')
0 files changed, 0 insertions, 0 deletions