From: Insu Yun Date: Wed, 17 Feb 2016 16:47:35 +0000 (-0500) Subject: tipc: unlock in error path X-Git-Tag: firefly_0821_release~176^2~475^2~373 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4ac39c3e2c80000a40b11bde33f425a44f1ef55b;p=firefly-linux-kernel-4.4.55.git tipc: unlock in error path [ Upstream commit b53ce3e7d407aa4196877a48b8601181162ab158 ] tipc_bcast_unlock need to be unlocked in error path. Signed-off-by: Insu Yun Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c index 9dc239dfe192..92e367a0a5ce 100644 --- a/net/tipc/bcast.c +++ b/net/tipc/bcast.c @@ -399,8 +399,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)