summaryrefslogtreecommitdiff
path: root/net/tipc
diff options
context:
space:
mode:
authorInsu Yun <wuninsu@gmail.com>2016-02-17 11:47:35 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-03 15:07:07 -0800
commit4ac39c3e2c80000a40b11bde33f425a44f1ef55b (patch)
treee044badf10ddbdcbcacb9feb5a62e6e638d1ade8 /net/tipc
parentb7c2e2acc62c3c1a7d2b36032fd14ee53417fa7d (diff)
tipc: unlock in error path
[ Upstream commit b53ce3e7d407aa4196877a48b8601181162ab158 ] tipc_bcast_unlock need to be unlocked in error path. Signed-off-by: Insu Yun <wuninsu@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/tipc')
-rw-r--r--net/tipc/bcast.c4
1 files changed, 3 insertions, 1 deletions
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)