OpenCloudOS-Kernel/tools/bpf/bpftool
Quentin Monnet d34b044038 tools: bpftool: close prog FD before exit on showing a single program
When showing metadata about a single program by invoking
"bpftool prog show PROG", the file descriptor referring to the program
is not closed before returning from the function. Let's close it.

Fixes: 71bb428fe2 ("tools: bpf: add bpftool")
Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2019-08-15 22:09:41 -07:00
..
Documentation tools: bpftool: add "prog run" subcommand to test-run programs 2019-07-05 23:48:07 +02:00
bash-completion tools: bpftool: add completion for bpftool prog "loadall" 2019-07-08 17:20:34 +02:00
.gitignore bpftool: exclude bash-completion/bpftool from .gitignore pattern 2019-05-04 23:43:57 -07:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
btf.c bpftool: add C output format option to btf dump subcommand 2019-05-24 14:05:58 -07:00
btf_dumper.c bpf: bpftool support for dumping data/bss/rodata sections 2019-04-09 17:05:47 -07:00
cfg.c tools: bpftool: teach cfg code about JMP32 2019-01-26 13:33:01 -08:00
cfg.h tools: bpftool: replace Netronome boilerplate with SPDX license headers 2018-12-13 12:08:44 +01:00
cgroup.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-07-08 19:48:57 -07:00
common.c tools: bpftool: add error message on pin failure 2019-08-09 17:38:53 +02:00
feature.c bpftool: feature probing, change default action 2019-01-24 10:47:52 +01:00
jit_disasm.c tools: bpftool: Fix json dump crash on powerpc 2019-07-05 23:50:38 +02:00
json_writer.c tools: bpftool: Cleanup license mess 2019-01-18 15:26:54 -08:00
json_writer.h tools: bpftool: Cleanup license mess 2019-01-18 15:26:54 -08:00
main.c tools: bpftool: add "prog run" subcommand to test-run programs 2019-07-05 23:48:07 +02:00
main.h tools: bpftool: add raw_tracepoint_writable prog type to header 2019-07-12 15:14:42 +02:00
map.c tools: bpftool: Fix JSON output when lookup fails 2019-06-05 22:08:26 +02:00
map_perf_ring.c tools/bpftool: switch map event_pipe to libbpf's perf_buffer 2019-07-08 15:35:43 +02:00
net.c bpftool: show flow_dissector attachment status 2019-04-25 23:49:06 +02:00
netlink_dumper.c tools: bpftool: dual license all files 2018-12-13 12:08:44 +01:00
netlink_dumper.h tools: bpftool: dual license all files 2018-12-13 12:08:44 +01:00
perf.c tools: bpftool: dual license all files 2018-12-13 12:08:44 +01:00
prog.c tools: bpftool: close prog FD before exit on showing a single program 2019-08-15 22:09:41 -07:00
tracelog.c tools: bpftool: add an option to prevent auto-mount of bpffs, tracefs 2018-12-18 14:47:17 +01:00
xlated_dumper.c bpf: style fix in while(!feof()) loop 2019-05-28 10:54:01 +02:00
xlated_dumper.h tools: bpftool: replace Netronome boilerplate with SPDX license headers 2018-12-13 12:08:44 +01:00