aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/prog_tests/prog_array_init.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <[email protected]>2024-05-29 15:32:39 -0700
committerAlexei Starovoitov <[email protected]>2024-05-31 20:35:55 -0700
commit531876c80004ecff7bfdbd8ba6c6b48835ef5e22 (patch)
tree2155c4d8b9eae681b2ac8081c12d43ce80c7c6e5 /tools/testing/selftests/bpf/prog_tests/prog_array_init.c
parent3f8fde319524411b96badee3c96f35831300388a (diff)
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 <[email protected]> Fixes: bc308d011ab8 ("libbpf: call dup2() syscall directly") Signed-off-by: Andrii Nakryiko <[email protected]> Acked-by: Jiri Olsa <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/prog_array_init.c')
0 files changed, 0 insertions, 0 deletions