From: Alan Maguire <alan.maguire@oracle.com>
To: andrii@kernel.org, eddyz87@gmail.com
Cc: ast@kernel.org, daniel@iogearbox.net, jolsa@kernel.org,
martin.lau@linux.dev, song@kernel.org, yonghong.song@linux.dev,
john.fastabend@gmail.com, kpsingh@kernel.org, sdf@google.com,
haoluo@google.com, bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next] libbpf: fix error handling in btf__distill_base()
Date: Sat, 29 Jun 2024 11:04:21 +0100 [thread overview]
Message-ID: <1fd2d7bd-e831-4e4c-89f5-4230f0a71cd6@oracle.com> (raw)
In-Reply-To: <20240629100058.2866763-1-alan.maguire@oracle.com>
On 29/06/2024 11:00, Alan Maguire wrote:
> Coverity points out that after calling btf__new_empty_split()
> the wrong value is checked for error.
>
> Reported-by: Andrii Nakryiko <andrii@kernel.org>
> Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
apologies, forgot
Fixes: 58e185a0dc35 ("libbpf: Add btf__distill_base() creating split BTF
with distilled base BTF")
> ---
> tools/lib/bpf/btf.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/lib/bpf/btf.c b/tools/lib/bpf/btf.c
> index cd5dd6619214..32c00db3b91b 100644
> --- a/tools/lib/bpf/btf.c
> +++ b/tools/lib/bpf/btf.c
> @@ -5431,7 +5431,7 @@ int btf__distill_base(const struct btf *src_btf, struct btf **new_base_btf,
> * BTF available.
> */
> new_split = btf__new_empty_split(new_base);
> - if (!new_split_btf) {
> + if (!new_split) {
> err = -errno;
> goto done;
> }
next prev parent reply other threads:[~2024-06-29 10:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-29 10:00 [PATCH bpf-next] libbpf: fix error handling in btf__distill_base() Alan Maguire
2024-06-29 10:04 ` Alan Maguire [this message]
2024-07-01 15:10 ` patchwork-bot+netdevbpf
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=1fd2d7bd-e831-4e4c-89f5-4230f0a71cd6@oracle.com \
--to=alan.maguire@oracle.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=martin.lau@linux.dev \
--cc=sdf@google.com \
--cc=song@kernel.org \
--cc=yonghong.song@linux.dev \
/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