All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] test_bpf: Fix NULL vs IS_ERR() check in test_skb_segment()
@ 2018-03-28 11:48 ` Dan Carpenter
  0 siblings, 0 replies; 10+ messages in thread
From: Dan Carpenter @ 2018-03-28 11:48 UTC (permalink / raw)
  To: Alexei Starovoitov, Yonghong Song
  Cc: Daniel Borkmann, netdev, kernel-janitors

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__);

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH] test_bpf: Fix NULL vs IS_ERR() check in test_skb_segment()
@ 2018-03-28 11:48 ` Dan Carpenter
  0 siblings, 0 replies; 10+ messages in thread
From: Dan Carpenter @ 2018-03-28 11:48 UTC (permalink / raw)
  To: Alexei Starovoitov, Yonghong Song
  Cc: Daniel Borkmann, netdev, kernel-janitors

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__);

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] test_bpf: Fix NULL vs IS_ERR() check in test_skb_segment()
  2018-03-28 11:48 ` Dan Carpenter
@ 2018-03-28 13:25   ` Daniel Borkmann
  -1 siblings, 0 replies; 10+ messages in thread
From: Daniel Borkmann @ 2018-03-28 13:25 UTC (permalink / raw)
  To: Dan Carpenter, Alexei Starovoitov, Yonghong Song; +Cc: netdev, kernel-janitors

On 03/28/2018 01:48 PM, 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>

Patch is directly for net-next, thanks!

Acked-by: Daniel Borkmann <daniel@iogearbox.net>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] test_bpf: Fix NULL vs IS_ERR() check in test_skb_segment()
@ 2018-03-28 13:25   ` Daniel Borkmann
  0 siblings, 0 replies; 10+ messages in thread
From: Daniel Borkmann @ 2018-03-28 13:25 UTC (permalink / raw)
  To: Dan Carpenter, Alexei Starovoitov, Yonghong Song; +Cc: netdev, kernel-janitors

On 03/28/2018 01:48 PM, 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>

Patch is directly for net-next, thanks!

Acked-by: Daniel Borkmann <daniel@iogearbox.net>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] test_bpf: Fix NULL vs IS_ERR() check in test_skb_segment()
  2018-03-28 11:48 ` Dan Carpenter
@ 2018-03-28 16:19   ` Yonghong Song
  -1 siblings, 0 replies; 10+ messages in thread
From: Yonghong Song @ 2018-03-28 16:19 UTC (permalink / raw)
  To: Dan Carpenter, Alexei Starovoitov
  Cc: Daniel Borkmann, netdev, kernel-janitors



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>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] test_bpf: Fix NULL vs IS_ERR() check in test_skb_segment()
@ 2018-03-28 16:19   ` Yonghong Song
  0 siblings, 0 replies; 10+ messages in thread
From: Yonghong Song @ 2018-03-28 16:19 UTC (permalink / raw)
  To: Dan Carpenter, Alexei Starovoitov
  Cc: Daniel Borkmann, netdev, kernel-janitors



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>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] test_bpf: Fix NULL vs IS_ERR() check in test_skb_segment()
  2018-03-28 16:19   ` Yonghong Song
@ 2018-03-28 18:57     ` Daniel Borkmann
  -1 siblings, 0 replies; 10+ messages in thread
From: Daniel Borkmann @ 2018-03-28 18:57 UTC (permalink / raw)
  To: Yonghong Song, Dan Carpenter, Alexei Starovoitov
  Cc: netdev, kernel-janitors, davem

Hi David,

On 03/28/2018 06:19 PM, Yonghong Song wrote:
> 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>

If you have a chance, please take this fix directly into your net-next tree
since it also contains the original commit 76db8087c4c9 ("net: bpf: add a
test for skb_segment in test_bpf module"), which is not in the bpf-next tree
at this point.

Thanks a lot,
Daniel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] test_bpf: Fix NULL vs IS_ERR() check in test_skb_segment()
@ 2018-03-28 18:57     ` Daniel Borkmann
  0 siblings, 0 replies; 10+ messages in thread
From: Daniel Borkmann @ 2018-03-28 18:57 UTC (permalink / raw)
  To: Yonghong Song, Dan Carpenter, Alexei Starovoitov
  Cc: netdev, kernel-janitors, davem

Hi David,

On 03/28/2018 06:19 PM, Yonghong Song wrote:
> 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>

If you have a chance, please take this fix directly into your net-next tree
since it also contains the original commit 76db8087c4c9 ("net: bpf: add a
test for skb_segment in test_bpf module"), which is not in the bpf-next tree
at this point.

Thanks a lot,
Daniel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] test_bpf: Fix NULL vs IS_ERR() check in test_skb_segment()
  2018-03-28 18:57     ` Daniel Borkmann
@ 2018-03-29 18:33       ` David Miller
  -1 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2018-03-29 18:33 UTC (permalink / raw)
  To: daniel; +Cc: yhs, dan.carpenter, ast, netdev, kernel-janitors

From: Daniel Borkmann <daniel@iogearbox.net>
Date: Wed, 28 Mar 2018 20:57:27 +0200

> If you have a chance, please take this fix directly into your net-next tree
> since it also contains the original commit 76db8087c4c9 ("net: bpf: add a
> test for skb_segment in test_bpf module"), which is not in the bpf-next tree
> at this point.

Ok, done.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] test_bpf: Fix NULL vs IS_ERR() check in test_skb_segment()
@ 2018-03-29 18:33       ` David Miller
  0 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2018-03-29 18:33 UTC (permalink / raw)
  To: daniel; +Cc: yhs, dan.carpenter, ast, netdev, kernel-janitors

From: Daniel Borkmann <daniel@iogearbox.net>
Date: Wed, 28 Mar 2018 20:57:27 +0200

> If you have a chance, please take this fix directly into your net-next tree
> since it also contains the original commit 76db8087c4c9 ("net: bpf: add a
> test for skb_segment in test_bpf module"), which is not in the bpf-next tree
> at this point.

Ok, done.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-03-29 18:33 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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.