[net-next,v2] tipc: fix return value check in tipc_mcast_send_sync()
diff mbox series

Message ID 20190325063109.173692-1-weiyongjun1@huawei.com
State Accepted
Delegated to: David Miller
Headers show
Series
  • [net-next,v2] tipc: fix return value check in tipc_mcast_send_sync()
Related show

Commit Message

Wei Yongjun March 25, 2019, 6:31 a.m. UTC
Fix the return value check which testing the wrong variable
in tipc_mcast_send_sync().

Fixes: c55c8edafa91 ("tipc: smooth change between replicast and broadcast")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
v1 -> v2: add reported-by
---
 net/tipc/bcast.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jon Maloy March 25, 2019, 4:29 p.m. UTC | #1
Acked-by: Jon Maloy <jon.maloy@ericsson.com>

> -----Original Message-----
> From: netdev-owner@vger.kernel.org <netdev-owner@vger.kernel.org>
> On Behalf Of Wei Yongjun
> Sent: 25-Mar-19 07:31
> To: Jon Maloy <jon.maloy@ericsson.com>; Ying Xue
> <ying.xue@windriver.com>; Hoang Huu Le <hoang.h.le@dektech.com.au>;
> Eric Dumazet <eric.dumazet@gmail.com>
> Cc: Wei Yongjun <weiyongjun1@huawei.com>; netdev@vger.kernel.org;
> tipc-discussion@lists.sourceforge.net; kernel-janitors@vger.kernel.org; Hulk
> Robot <hulkci@huawei.com>
> Subject: [PATCH net-next v2] tipc: fix return value check in
> tipc_mcast_send_sync()
> 
> Fix the return value check which testing the wrong variable in
> tipc_mcast_send_sync().
> 
> Fixes: c55c8edafa91 ("tipc: smooth change between replicast and broadcast")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
> v1 -> v2: add reported-by
> ---
>  net/tipc/bcast.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c index
> 88edfb358ae7..76e14dc08bb9 100644
> --- a/net/tipc/bcast.c
> +++ b/net/tipc/bcast.c
> @@ -329,7 +329,7 @@ static int tipc_mcast_send_sync(struct net *net,
> struct sk_buff *skb,
> 
>  	/* Allocate dummy message */
>  	_skb = tipc_buf_acquire(MCAST_H_SIZE, GFP_KERNEL);
> -	if (!skb)
> +	if (!_skb)
>  		return -ENOMEM;
> 
>  	/* Preparing for 'synching' header */
> 
>
David Miller March 26, 2019, 6:39 p.m. UTC | #2
From: Wei Yongjun <weiyongjun1@huawei.com>
Date: Mon, 25 Mar 2019 06:31:09 +0000

> Fix the return value check which testing the wrong variable
> in tipc_mcast_send_sync().
> 
> Fixes: c55c8edafa91 ("tipc: smooth change between replicast and broadcast")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
> v1 -> v2: add reported-by

Applied.

Patch
diff mbox series

diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c
index 88edfb358ae7..76e14dc08bb9 100644
--- a/net/tipc/bcast.c
+++ b/net/tipc/bcast.c
@@ -329,7 +329,7 @@  static int tipc_mcast_send_sync(struct net *net, struct sk_buff *skb,
 
 	/* Allocate dummy message */
 	_skb = tipc_buf_acquire(MCAST_H_SIZE, GFP_KERNEL);
-	if (!skb)
+	if (!_skb)
 		return -ENOMEM;
 
 	/* Preparing for 'synching' header */