original_kernel/tools/lib/bpf
Andrii Nakryiko 7d0b3953f6 libbpf: don't close(-1) in multi-uprobe feature detector
Guard close(link_fd) with extra link_fd >= 0 check to prevent close(-1).

Detected by Coverity static analysis.

Fixes: 04d939a2ab ("libbpf: detect broken PID filtering logic for multi-uprobe")
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Link: https://lore.kernel.org/r/20240529231212.768828-1-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2024-05-31 14:56:51 -07:00
..
.gitignore
Build
Makefile
bpf.c libbpf: fix feature detectors when using token_fd 2024-05-15 09:34:53 -07:00
bpf.h
bpf_core_read.h bpf: Avoid uninitialized value in BPF_CORE_READ_BITFIELD 2024-05-08 15:00:55 -07:00
bpf_endian.h
bpf_gen_internal.h
bpf_helpers.h libbpf: Fix bpf_ksym_exists() in GCC 2024-05-02 22:47:22 -07:00
bpf_prog_linfo.c
bpf_tracing.h libbpf: Avoid casts from pointers to enums in bpf_tracing.h 2024-05-02 22:58:58 -07:00
btf.c
btf.h
btf_dump.c libbpf: Fix dump of subsequent char arrays 2024-04-17 15:24:02 +02:00
elf.c
features.c libbpf: don't close(-1) in multi-uprobe feature detector 2024-05-31 14:56:51 -07:00
gen_loader.c
hashmap.c
hashmap.h
libbpf.c libbpf: improve early detection of doomed-to-fail BPF program loading 2024-05-07 16:21:59 -07:00
libbpf.h libbpf: Add support for kprobe session attach 2024-04-30 09:45:53 -07:00
libbpf.map libbpf: Add bpf_link support for BPF_PROG_TYPE_SOCKMAP 2024-04-10 19:52:25 -07:00
libbpf.pc.template
libbpf_common.h
libbpf_errno.c
libbpf_internal.h libbpf: Mark libbpf_kallsyms_parse static function 2024-03-28 18:31:41 -07:00
libbpf_legacy.h
libbpf_probes.c bpf: improve error message for unsupported helper 2024-03-28 18:30:53 -07:00
libbpf_version.h libbpf: Start v1.5 development cycle 2024-04-06 09:11:10 -07:00
linker.c
netlink.c
nlattr.c
nlattr.h
relo_core.c
relo_core.h
ringbuf.c libbpf: fix ring_buffer__consume_n() return result logic 2024-05-02 16:41:03 -07:00
skel_internal.h
str_error.c libbpf: fix libbpf_strerror_r() handling unknown errors 2024-05-07 16:21:59 -07:00
str_error.h
strset.c
strset.h
usdt.bpf.h libbpf: Avoid casts from pointers to enums in bpf_tracing.h 2024-05-02 22:58:58 -07:00
usdt.c
zip.c
zip.h