[PATCH] tipc: unlock in error path

Subsystems: networking [general], the rest, tipc network layer

STALE3855d

3 messages, 3 authors, 2016-02-19 · open the first message on its own page

[PATCH] tipc: unlock in error path

From: Insu Yun <hidden>
Date: 2016-02-17 16:47:33

tipc_bcast_unlock need to be unlocked in error path.

Signed-off-by: Insu Yun <redacted>
---
 net/tipc/link.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/net/tipc/link.c b/net/tipc/link.c
index 0c2944f..347cdc9 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -1973,8 +1973,10 @@ int tipc_nl_add_bc_link(struct net *net, struct tipc_nl_msg *msg)
 
 	hdr = genlmsg_put(msg->skb, msg->portid, msg->seq, &tipc_genl_family,
 			  NLM_F_MULTI, TIPC_NL_LINK_GET);
-	if (!hdr)
+	if (!hdr) {
+		tipc_bcast_unlock(net);
 		return -EMSGSIZE;
+	}
 
 	attrs = nla_nest_start(msg->skb, TIPC_NLA_LINK);
 	if (!attrs)
-- 
1.9.1

RE: [PATCH] tipc: unlock in error path

From: Xue, Ying <hidden>
Date: 2016-02-18 13:13:10

Acked-by: Ying Xue  <redacted>

-----Original Message-----
From: Insu Yun [mailto:wuninsu@gmail.com] 
Sent: 2016年2月18日 0:48
To: jon.maloy@ericsson.com; Xue, Ying; davem@davemloft.net; netdev@vger.kernel.org; tipc-discussion@lists.sourceforge.net; linux-kernel@vger.kernel.org
Cc: taesoo@gatech.edu; yeongjin.jang@gatech.edu; insu@gatech.edu; changwoo@gatech.edu; Insu Yun
Subject: [PATCH] tipc: unlock in error path

tipc_bcast_unlock need to be unlocked in error path.

Signed-off-by: Insu Yun <redacted>
---
 net/tipc/link.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/net/tipc/link.c b/net/tipc/link.c index 0c2944f..347cdc9 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -1973,8 +1973,10 @@ int tipc_nl_add_bc_link(struct net *net, struct tipc_nl_msg *msg)
 
 	hdr = genlmsg_put(msg->skb, msg->portid, msg->seq, &tipc_genl_family,
 			  NLM_F_MULTI, TIPC_NL_LINK_GET);
-	if (!hdr)
+	if (!hdr) {
+		tipc_bcast_unlock(net);
 		return -EMSGSIZE;
+	}
 
 	attrs = nla_nest_start(msg->skb, TIPC_NLA_LINK);
 	if (!attrs)
--
1.9.1

Re: [PATCH] tipc: unlock in error path

From: David Miller <davem@davemloft.net>
Date: 2016-02-19 20:40:29

From: Insu Yun <redacted>
Date: Wed, 17 Feb 2016 11:47:35 -0500
tipc_bcast_unlock need to be unlocked in error path.

Signed-off-by: Insu Yun <redacted>
Applied.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help