diff mbox

tipc: unlock in error path

Message ID 1455727655-32106-1-git-send-email-wuninsu@gmail.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Insu Yun Feb. 17, 2016, 4:47 p.m. UTC
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(-)

Comments

David Miller Feb. 19, 2016, 8:40 p.m. UTC | #1
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.
diff mbox

Patch

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)