Received: by 10.223.176.5 with SMTP id f5csp1034708wra; Fri, 2 Feb 2018 10:03:29 -0800 (PST) X-Google-Smtp-Source: AH8x224eG1+IWZXLv4EDPc/9fP+W5/s/jLyVdThHDArpfYKD1B/ky4MDtVbDfYBFz7ZDWt4GR8+h X-Received: by 10.98.248.1 with SMTP id d1mr40916288pfh.222.1517594609440; Fri, 02 Feb 2018 10:03:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517594609; cv=none; d=google.com; s=arc-20160816; b=vXfdDGxmpPuIoZPPiVxD5L+OQSrlRWnbOmcOwMFsJnWg3GS7gFPIScmmMXXXzRry9l znAW1Hz5WhLr5n5qtuenvuzENXlaZEal+LuPpNFi0JwwryCn7tGgGsz/mM7AAuU4AYZF IImqfG9a+gxO2kSjQKYX/jhVx3R7ynlyLCLjjyL6n0IF5DOpPZPfv6sXK8z9n+i1CTKz ifw9pJ+kDJwrOpOyPam4zQxRTmbHtCXq9QE5Q/HfigmcTtAbfXneflOM2CnPkPCWG1iT 1Ic3ZRB4QYABtHb05aVMVHdfKDQtNsWwLEiakElv3x6/lH/N6vxhSek8tJgaNK3Y8NKY JXpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=TVGsWZo2r82wzaOtBLbex3J4fpQvRBBZBAEiKEh/8gQ=; b=Z4A13shsZ6BWG5CTADFUAcky+jsLrl3gp2gbNGZJ7U+Y5z7of5Z4lnfSd8lVDlrfHa 5Oyok94yHQJnMM/JXmXLys+FPDQKntgzB575YC6uiES8Ko2edQJwNQJz70mcBo7vGCqa 0gzUqpvumBrTO8hlcakcJFQLoAxKDpET0w1UhzQyraE27x5EU0I6hd4VtrZaCm8r9Fcc boa7Rd54sPzXuVD+b+K7LBE8Toxg803amyCj2Ptyeq7B4jqxvOJpK7X22UboH3+dJ0sr cz6et3q6m0XE3yMYn9MSAP7SMBRz/VR0TB9N/5ipWlYe1xz6wJR6drPrpC+e+8i4JDNG ykzQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i14si1684805pgp.516.2018.02.02.10.03.14; Fri, 02 Feb 2018 10:03:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753800AbeBBSBX (ORCPT + 99 others); Fri, 2 Feb 2018 13:01:23 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:38006 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753252AbeBBRJh (ORCPT ); Fri, 2 Feb 2018 12:09:37 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 038C2D31; Fri, 2 Feb 2018 17:09:35 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, David Howells , Sasha Levin Subject: [PATCH 4.14 058/156] rxrpc: The mutex lock returned by rxrpc_accept_call() needs releasing Date: Fri, 2 Feb 2018 17:57:19 +0100 Message-Id: <20180202140842.911280244@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180202140840.242829545@linuxfoundation.org> References: <20180202140840.242829545@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: David Howells [ Upstream commit 03a6c82218b9a87014b2c6c4e178294fdc8ebd8a ] The caller of rxrpc_accept_call() must release the lock on call->user_mutex returned by that function. Signed-off-by: David Howells Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- net/rxrpc/sendmsg.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- a/net/rxrpc/sendmsg.c +++ b/net/rxrpc/sendmsg.c @@ -563,8 +563,8 @@ int rxrpc_do_sendmsg(struct rxrpc_sock * /* The socket is now unlocked. */ if (IS_ERR(call)) return PTR_ERR(call); - rxrpc_put_call(call, rxrpc_call_put); - return 0; + ret = 0; + goto out_put_unlock; } call = rxrpc_find_call_by_user_ID(rx, p.user_call_ID); @@ -633,6 +633,7 @@ int rxrpc_do_sendmsg(struct rxrpc_sock * ret = rxrpc_send_data(rx, call, msg, len, NULL); } +out_put_unlock: mutex_unlock(&call->user_mutex); error_put: rxrpc_put_call(call, rxrpc_call_put);