Skip to contentSkip to conversation

tipc: fix return value check in tipc_mcast_send_sync()

PATCH Superseded Wei Yongjun 4 participants 5 messages Mar 21, 2019 – Mar 26, 2019

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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")
---
 net/tipc/bcast.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/tipc/bcast.c +1 -1
index 5264a8ff6e01..a41c0fa9c650 100644
@@ -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 */
#1 lore raw
Quoted 17 lines · Wei Yongjun

Fix the return value check which testing the wrong variable in tipc_mcast_send_sync().

Fixes c55c8edafa91 ("tipc: smooth change between replicast and broadcast")
---
 net/tipc/bcast.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/tipc/bcast.c +0 -0
index 5264a8ff6e01..a41c0fa9c650 100644

net/tipc/bcast.c static int tipc_mcast_send_sync(struct net *net, struct sk_buff *skb, · line 335

Quoted 8 lines
net/tipc/bcast.c +1 -1
@@ -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 */

Thanks for the patch, but some 'Reported-by:' tags are missing :/

#2 lore raw

PATCH v2 1/1 tipc: fix return value check in tipc_mcast_send_sync()

In reply to Wei Yongjun

Fix the return value check which testing the wrong variable in tipc_mcast_send_sync().

Fixes c55c8edafa91 ("tipc: smooth change between replicast and broadcast")

---
v1 -> v2: add reported-by

---
 net/tipc/bcast.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/tipc/bcast.c +1 -1
index 88edfb358ae7..76e14dc08bb9 100644
@@ -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 */
Acked-by on v2 1/1
#3 lore raw
Quoted 41 lines

-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Wei Yongjun
Sent: 25-Mar-19 07:31
To: Jon Maloy <[email protected]>; Ying Xue <[email protected]>; Hoang Huu Le <[email protected]>; Eric Dumazet <[email protected]>
Cc: Wei Yongjun <[email protected]>; [email protected]; [email protected]; [email protected]; Hulk Robot <[email protected]>
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")

---
v1 -> v2: add reported-by

---
 net/tipc/bcast.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/tipc/bcast.c index renamed from net/tipc/bcast.c +0 -0

88edfb358ae7..76e14dc08bb9 100644

net/tipc/bcast.c +1 -1
@@ -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 */