From: Martin KaFai Lau <kafai@fb.com>
To: YueHaibing <yuehaibing@huawei.com>
Cc: <ast@kernel.org>, <daniel@iogearbox.net>,
<quentin.monnet@netronome.com>, <jakub.kicinski@netronome.com>,
<bhole_prashant_q7@lab.ntt.co.jp>, <osk@fb.com>,
<linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>,
<davem@davemloft.net>
Subject: Re: [PATCH bpf-next] bpf: btf: fix inconsistent IS_ERR and PTR_ERR
Date: Tue, 24 Jul 2018 08:45:49 -0700 [thread overview]
Message-ID: <20180724154549.dulibeesja7ajwni@kafai-mbp> (raw)
In-Reply-To: <20180724025524.22012-1-yuehaibing@huawei.com>
On Tue, Jul 24, 2018 at 10:55:24AM +0800, YueHaibing wrote:
> Fix inconsistent IS_ERR and PTR_ERR in get_btf,
> the proper pointer to be passed as argument is '*btf'
>
> This issue was detected with the help of Coccinelle.
>
> Fixes: 2d3feca8c44f ("bpf: btf: print map dump and lookup with btf info")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Martin KaFai Lau <kafai@fb.com>
> ---
> tools/bpf/bpftool/map.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/bpf/bpftool/map.c b/tools/bpf/bpftool/map.c
> index 9c81918..0ee3ba4 100644
> --- a/tools/bpf/bpftool/map.c
> +++ b/tools/bpf/bpftool/map.c
> @@ -230,7 +230,7 @@ static int get_btf(struct bpf_map_info *map_info, struct btf **btf)
>
> *btf = btf__new((__u8 *)btf_info.btf, btf_info.btf_size, NULL);
> if (IS_ERR(*btf)) {
> - err = PTR_ERR(btf);
> + err = PTR_ERR(*btf);
> *btf = NULL;
> }
>
> --
> 2.7.0
>
>
next prev parent reply other threads:[~2018-07-24 15:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-24 2:55 [PATCH bpf-next] bpf: btf: fix inconsistent IS_ERR and PTR_ERR YueHaibing
2018-07-24 3:20 ` David Miller
2018-07-24 3:40 ` Jakub Kicinski
2018-07-24 15:45 ` Martin KaFai Lau [this message]
2018-07-25 5:45 ` Daniel Borkmann
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=20180724154549.dulibeesja7ajwni@kafai-mbp \
--to=kafai@fb.com \
--cc=ast@kernel.org \
--cc=bhole_prashant_q7@lab.ntt.co.jp \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=jakub.kicinski@netronome.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=osk@fb.com \
--cc=quentin.monnet@netronome.com \
--cc=yuehaibing@huawei.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