summaryrefslogtreecommitdiff
path: root/certs
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2024-05-30 01:32:39 +0300
committerAlexei Starovoitov <ast@kernel.org>2024-06-01 06:35:55 +0300
commit531876c80004ecff7bfdbd8ba6c6b48835ef5e22 (patch)
tree2155c4d8b9eae681b2ac8081c12d43ce80c7c6e5 /certs
parent3f8fde319524411b96badee3c96f35831300388a (diff)
downloadlinux-531876c80004ecff7bfdbd8ba6c6b48835ef5e22.tar.xz
libbpf: keep FD_CLOEXEC flag when dup()'ing FD
Make sure to preserve and/or enforce FD_CLOEXEC flag on duped FDs. Use dup3() with O_CLOEXEC flag for that. Without this fix libbpf effectively clears FD_CLOEXEC flag on each of BPF map/prog FD, which is definitely not the right or expected behavior. Reported-by: Lennart Poettering <lennart@poettering.net> Fixes: bc308d011ab8 ("libbpf: call dup2() syscall directly") Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Acked-by: Jiri Olsa <jolsa@kernel.org> Link: https://lore.kernel.org/r/20240529223239.504241-1-andrii@kernel.org Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'certs')
0 files changed, 0 insertions, 0 deletions