Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932756AbcCBBbZ (ORCPT ); Tue, 1 Mar 2016 20:31:25 -0500 Received: from mail177-1.suw61.mandrillapp.com ([198.2.177.1]:23733 "EHLO mail177-1.suw61.mandrillapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932088AbcCAXyq (ORCPT ); Tue, 1 Mar 2016 18:54:46 -0500 From: Greg Kroah-Hartman Subject: [PATCH 4.4 045/342] tipc: unlock in error path X-Mailer: git-send-email 2.7.2 To: Cc: Greg Kroah-Hartman , , Insu Yun , "David S. Miller" Message-Id: <20160301234529.424243327@linuxfoundation.org> In-Reply-To: <20160301234527.990448862@linuxfoundation.org> References: <20160301234527.990448862@linuxfoundation.org> X-Report-Abuse: Please forward a copy of this message, including all headers, to abuse@mandrill.com X-Report-Abuse: You can also report abuse here: http://mandrillapp.com/contact/abuse?id=30481620.38b0e3dfa1b14b4e9c0e3eccacae0222 X-Mandrill-User: md_30481620 Date: Tue, 01 Mar 2016 23:53:57 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 857 Lines: 31 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Insu Yun [ 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 --- net/tipc/bcast.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/net/tipc/bcast.c +++ b/net/tipc/bcast.c @@ -399,8 +399,10 @@ int tipc_nl_add_bc_link(struct net *net, 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)