All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yonghong Song <yhs@fb.com>
To: Dan Carpenter <dan.carpenter@oracle.com>,
	Alexei Starovoitov <ast@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>, <netdev@vger.kernel.org>,
	<kernel-janitors@vger.kernel.org>
Subject: Re: [PATCH] test_bpf: Fix NULL vs IS_ERR() check in test_skb_segment()
Date: Wed, 28 Mar 2018 09:19:27 -0700	[thread overview]
Message-ID: <b76502fe-4aa0-599f-23e2-72a773c7f764@fb.com> (raw)
In-Reply-To: <20180328114836.GD29050@mwanda>



On 3/28/18 4:48 AM, Dan Carpenter wrote:
> The skb_segment() function returns error pointers on error.  It never
> returns NULL.
> 
> Fixes: 76db8087c4c9 ("net: bpf: add a test for skb_segment in test_bpf module")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/lib/test_bpf.c b/lib/test_bpf.c
> index b2badf6b23cd..8e157806df7a 100644
> --- a/lib/test_bpf.c
> +++ b/lib/test_bpf.c
> @@ -6649,7 +6649,7 @@ static __init int test_skb_segment(void)
>   	}
>   
>   	segs = skb_segment(skb, features);
> -	if (segs) {
> +	if (!IS_ERR(segs)) {
>   		kfree_skb_list(segs);
>   		ret = 0;
>   		pr_info("%s: success in skb_segment!", __func__);

Oh, my bad. Thanks for the fix!
Reviewed-by: Yonghong Song <yhs@fb.com>

WARNING: multiple messages have this Message-ID (diff)
From: Yonghong Song <yhs@fb.com>
To: Dan Carpenter <dan.carpenter@oracle.com>,
	Alexei Starovoitov <ast@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>,
	netdev@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] test_bpf: Fix NULL vs IS_ERR() check in test_skb_segment()
Date: Wed, 28 Mar 2018 16:19:27 +0000	[thread overview]
Message-ID: <b76502fe-4aa0-599f-23e2-72a773c7f764@fb.com> (raw)
In-Reply-To: <20180328114836.GD29050@mwanda>



On 3/28/18 4:48 AM, Dan Carpenter wrote:
> The skb_segment() function returns error pointers on error.  It never
> returns NULL.
> 
> Fixes: 76db8087c4c9 ("net: bpf: add a test for skb_segment in test_bpf module")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/lib/test_bpf.c b/lib/test_bpf.c
> index b2badf6b23cd..8e157806df7a 100644
> --- a/lib/test_bpf.c
> +++ b/lib/test_bpf.c
> @@ -6649,7 +6649,7 @@ static __init int test_skb_segment(void)
>   	}
>   
>   	segs = skb_segment(skb, features);
> -	if (segs) {
> +	if (!IS_ERR(segs)) {
>   		kfree_skb_list(segs);
>   		ret = 0;
>   		pr_info("%s: success in skb_segment!", __func__);

Oh, my bad. Thanks for the fix!
Reviewed-by: Yonghong Song <yhs@fb.com>

  parent reply	other threads:[~2018-03-28 16:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-28 11:48 [PATCH] test_bpf: Fix NULL vs IS_ERR() check in test_skb_segment() Dan Carpenter
2018-03-28 11:48 ` Dan Carpenter
2018-03-28 13:25 ` Daniel Borkmann
2018-03-28 13:25   ` Daniel Borkmann
2018-03-28 16:19 ` Yonghong Song [this message]
2018-03-28 16:19   ` Yonghong Song
2018-03-28 18:57   ` Daniel Borkmann
2018-03-28 18:57     ` Daniel Borkmann
2018-03-29 18:33     ` David Miller
2018-03-29 18:33       ` David Miller

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=b76502fe-4aa0-599f-23e2-72a773c7f764@fb.com \
    --to=yhs@fb.com \
    --cc=ast@kernel.org \
    --cc=dan.carpenter@oracle.com \
    --cc=daniel@iogearbox.net \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.