netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tipc: unlock in error path
@ 2016-02-17 16:47 Insu Yun
  2016-02-18 13:12 ` Xue, Ying
  2016-02-19 20:40 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Insu Yun @ 2016-02-17 16:47 UTC (permalink / raw)
  To: jon.maloy, ying.xue, davem, netdev, tipc-discussion, linux-kernel
  Cc: taesoo, yeongjin.jang, insu, changwoo, Insu Yun

tipc_bcast_unlock need to be unlocked in error path.

Signed-off-by: Insu Yun <wuninsu@gmail.com>
---
 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

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

* RE: [PATCH] tipc: unlock in error path
  2016-02-17 16:47 [PATCH] tipc: unlock in error path Insu Yun
@ 2016-02-18 13:12 ` Xue, Ying
  2016-02-19 20:40 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Xue, Ying @ 2016-02-18 13:12 UTC (permalink / raw)
  To: Insu Yun, jon.maloy@ericsson.com, 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

Acked-by: Ying Xue  <ying.xue@windriver.com>

-----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 <wuninsu@gmail.com>
---
 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


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

* Re: [PATCH] tipc: unlock in error path
  2016-02-17 16:47 [PATCH] tipc: unlock in error path Insu Yun
  2016-02-18 13:12 ` Xue, Ying
@ 2016-02-19 20:40 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2016-02-19 20:40 UTC (permalink / raw)
  To: wuninsu
  Cc: jon.maloy, ying.xue, netdev, tipc-discussion, linux-kernel,
	taesoo, yeongjin.jang, insu, changwoo

From: Insu Yun <wuninsu@gmail.com>
Date: Wed, 17 Feb 2016 11:47:35 -0500

> tipc_bcast_unlock need to be unlocked in error path.
> 
> Signed-off-by: Insu Yun <wuninsu@gmail.com>

Applied.

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

end of thread, other threads:[~2016-02-19 20:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-17 16:47 [PATCH] tipc: unlock in error path Insu Yun
2016-02-18 13:12 ` Xue, Ying
2016-02-19 20:40 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).