From: Andrii Nakryiko <andrii@kernel.org>
To: <bpf@vger.kernel.org>, <ast@kernel.org>, <daniel@iogearbox.net>
Cc: <andrii@kernel.org>, <kernel-team@fb.com>
Subject: [PATCH v2 bpf-next 1/4] selftests/bpf: fix double bpf_object__close() in veristate
Date: Wed, 21 Sep 2022 09:42:51 -0700 [thread overview]
Message-ID: <20220921164254.3630690-2-andrii@kernel.org> (raw)
In-Reply-To: <20220921164254.3630690-1-andrii@kernel.org>
bpf_object__close(obj) is called twice for BPF object files with single
BPF program in it. This causes crash. Fix this by not calling
bpf_object__close() unnecessarily.
Fixes: c8bc5e050976 ("selftests/bpf: Add veristat tool for mass-verifying BPF object files")
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
---
tools/testing/selftests/bpf/veristat.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/veristat.c b/tools/testing/selftests/bpf/veristat.c
index 39e6dc41e504..c0c8a65cda52 100644
--- a/tools/testing/selftests/bpf/veristat.c
+++ b/tools/testing/selftests/bpf/veristat.c
@@ -300,7 +300,6 @@ static int process_obj(const char *filename)
prog = bpf_object__next_program(obj, NULL);
bpf_program__set_autoload(prog, true);
process_prog(filename, obj, prog);
- bpf_object__close(obj);
goto cleanup;
}
--
2.30.2
next prev parent reply other threads:[~2022-09-21 16:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-21 16:42 [PATCH v2 bpf-next 0/4] veristat: CSV output, comparison mode, filtering Andrii Nakryiko
2022-09-21 16:42 ` Andrii Nakryiko [this message]
2022-09-21 16:42 ` [PATCH v2 bpf-next 2/4] selftests/bpf: add CSV output mode for veristat Andrii Nakryiko
2022-09-21 16:42 ` [PATCH v2 bpf-next 3/4] selftests/bpf: add comparison mode to veristat Andrii Nakryiko
2022-09-21 16:42 ` [PATCH v2 bpf-next 4/4] selftests/bpf: add ability to filter programs in veristat Andrii Nakryiko
2022-09-22 2:50 ` [PATCH v2 bpf-next 0/4] veristat: CSV output, comparison mode, filtering patchwork-bot+netdevbpf
2022-09-22 2:52 ` Alexei Starovoitov
2022-09-22 16:21 ` Andrii Nakryiko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220921164254.3630690-2-andrii@kernel.org \
--to=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kernel-team@fb.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox