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

-----Original Message-----
From: Insu Yun [mailto:wuni...@gmail.com] 
Sent: 2016年2月18日 0:48
To: jon.ma...@ericsson.com; Xue, Ying; da...@davemloft.net; 
netdev@vger.kernel.org; tipc-discuss...@lists.sourceforge.net; 
linux-ker...@vger.kernel.org
Cc: tae...@gatech.edu; yeongjin.j...@gatech.edu; i...@gatech.edu; 
chang...@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 <wuni...@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

Reply via email to