aboutsummaryrefslogtreecommitdiff
path: root/kernel/bpf/syscall.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <[email protected]>2023-05-25 15:13:11 -0700
committerDaniel Borkmann <[email protected]>2023-05-26 12:05:52 +0200
commit4aadd2920b81b3d7e5c8ac63c7d5d673f3c8aaeb (patch)
tree4a1d54f6f718825b19120ab68b73447f570321e0 /kernel/bpf/syscall.c
parent59842c5451fe830737600276ba9dee4595341d77 (diff)
libbpf: Ensure FD >= 3 during bpf_map__reuse_fd()
Improve bpf_map__reuse_fd() logic and ensure that dup'ed map FD is "good" (>= 3) and has O_CLOEXEC flags. Use fcntl(F_DUPFD_CLOEXEC) for that, similarly to ensure_good_fd() helper we already use in low-level APIs that work with bpf() syscall. Suggested-by: Lennart Poettering <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'kernel/bpf/syscall.c')
0 files changed, 0 insertions, 0 deletions