Received: by 10.223.176.46 with SMTP id f43csp283228wra; Tue, 23 Jan 2018 21:01:42 -0800 (PST) X-Google-Smtp-Source: AH8x227HR5T0G7A1N8jjLA0Hq8P9dey374JLCnSd6m38Bz5pcr06Zbf2XrRctNBRnfOgq60cqQmg X-Received: by 10.98.228.5 with SMTP id r5mr12172050pfh.193.1516770102868; Tue, 23 Jan 2018 21:01:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516770102; cv=none; d=google.com; s=arc-20160816; b=umVIUi8K2xLGo4RQoyMpMJHHCdpzRkvwYV2rYl385JwIq71OdDfJNW8aj1lgq7J1u7 fzF90mWCW1NDEB5mFunwEl57d28Em3wd7mAdZzgzIbB9YLBJ6bNGbD3dyIPR1/9zfG63 6ifE74z7XXX9C4y8vp3Z24aA1IFXKqjRjAEF8tOw1+wYdZf8v146NWVeun8C9MTvSeWb w1bBTKOMZCU0RIuQfD2OA6yrGRRJs9I9kxC8bxVr2r5aMHOKQAvq29BymEGp3Bv9+GLE MutGEkOwK6yJyqtFBY7RqWkIrvyerSp/755/ByOdDyQzkk3rYUkSCPYkgFjaFzqVD+Vg zo/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=1PgHwxZmJhnhuid0FdZiawWk2LvA9hwEnoq2Kfl72OQ=; b=nz0CnUpwlS/Xtm4BL4oeYzzjkoIuQm7JUQOFeJ5ShCTcpIdkFv5ehm/c+b2U93xZT2 cU0cIa8h+6M4yVbIITGDlqY0WSCuWvIYzX+utPsz/mRIAHJeX/Dlv+GA32+seB1olI/F kOBlPiUUimrYvTjWCE3NBVqxrKdi/xP6JfxN9oUxD5nelCe6nMkk94rutrNomK9PzrqK x2t38IJ0ZpRjsSxxq/tx2b4nEBgDepO9ZYuiiEa4HOjIu/m/h4tTm2Pj5e+ilR25TDjm blHSENAYtDtBRIhYfC44Goqn+HBNpGJMHfc0aKehmEeOtUOj6c+52CQjP3CohQ/u6vAM BDqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=M1h4WFtw; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 74si2298520pfl.59.2018.01.23.21.01.29; Tue, 23 Jan 2018 21:01:42 -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; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=M1h4WFtw; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932102AbeAXEPL (ORCPT + 99 others); Tue, 23 Jan 2018 23:15:11 -0500 Received: from mail-sn1nam01on0126.outbound.protection.outlook.com ([104.47.32.126]:36640 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752671AbeAXEOk (ORCPT ); Tue, 23 Jan 2018 23:14:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=1PgHwxZmJhnhuid0FdZiawWk2LvA9hwEnoq2Kfl72OQ=; b=M1h4WFtwAsbaox/JMZd2ibfYO3bh5dUZq0W87EdUsP0xwuo71QEviQY4i6i0onaAt1dVa2kER5gHczccHgWa4+HA6xZYI3NW1WMeQAMiP1klCKgf9mxBC674+wxHFUlwyQj2eCEklRfL2pb2Ca77x2qPMv7TRtx1/iZLKvWlSIU= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0998.namprd21.prod.outlook.com (52.132.133.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.464.0; Wed, 24 Jan 2018 04:14:37 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::6485:b98:d15e:9da7]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::6485:b98:d15e:9da7%2]) with mapi id 15.20.0464.000; Wed, 24 Jan 2018 04:14:37 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: David Howells , Sasha Levin Subject: [PATCH AUTOSEL for 4.14 029/100] rxrpc: The mutex lock returned by rxrpc_accept_call() needs releasing Thread-Topic: [PATCH AUTOSEL for 4.14 029/100] rxrpc: The mutex lock returned by rxrpc_accept_call() needs releasing Thread-Index: AQHTlMnZ85pNhlhW2EWGqGd1b0V+9Q== Date: Wed, 24 Jan 2018 04:14:37 +0000 Message-ID: <20180124041414.32065-29-alexander.levin@microsoft.com> References: <20180124041414.32065-1-alexander.levin@microsoft.com> In-Reply-To: <20180124041414.32065-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB0998;6:0RgnMYpBCT8X7/AlJgvE3xlW7YU3qQVuv9SX/qY710vmCo8ylWChVuU+uarOvgY6vfJgC5s1FlgVtGk34mkg+oTdmG2HZAwLCnGUChqsCJ7Lj8/rEVcqd7U5JCQTAdGhSlZr+p/VrIveOucn5m/SVXYEmh7rgEEtWHM/K4NXj1PKeOwu7XDukiuFiVh6li22/VgdEbWmsvVY598iWpnxuN/JLrpLfVm2WQtzg9WN8ows9hMAn73Hgm9B/Eg/oD0GsaN0t2gmdyILv6i5a0OvgrXWL2F/gmRZelkEV9No+OhcUppkHPXbmzYt124jIg4zkK9KxRMgOpQcTxraDfvp63D6nYyc/wxoSOZrsiTiXiZ/BH8WDXckJ/dRCZolsAZ7;5:DNnyc+axNSSkX9mmdKr88XmMHmrdj0GM+Laj0HqHwgozZI+JoDzHCfDYDaW3u6Ho6fO4dYHkUQDqAK30rH6gXFekCBjyxFFdl0HyNC/Gvl4pYzLFPl+N0GzaxgWSnanLsjDOuUwz6WTXd74bA6KeD/I22OnyKfYBZxshZOkKJq0=;24:PQNPLwlcKaxFnglA80hWng5mbDf8jE8CDzC/rBqPiwcoVbweErJggPmKxahOjP4dklTD5Bc6zIMfeA5LFCVKkfs4vcUej/eGMP9B0+4YDew=;7:QxIXfjLHBF7LV1kRi4Veivhi0so4v0OnvHw0TZlU7WpBxzwxpotti6ooSK7XkCfaPH59ZKKEg6kIHdjNt3xj7yXx0ujeEEs8N3712r++k+1XiS11sy9ptp02XDtQ7Iv1bpSPokDgae5RS6wuuSYZF+V45z790qjIzB8hvWO19I17ZsZKDHUGwAKGn0UXnggf52nlC12cqc/8DdivGB/6F7SDkPQNq2b1N0ndQlAGe76CkpvoCJrm90XK0WW0uGrv x-ms-exchange-antispam-srfa-diagnostics: SSOS;SSOR; x-ms-office365-filtering-correlation-id: a94f4375-bc13-4853-d2c9-08d562e0fbb8 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(2017052603307)(7193020);SRVR:DM5PR2101MB0998; x-ms-traffictypediagnostic: DM5PR2101MB0998: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(61425038)(6040501)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231046)(2400081)(944501161)(10201501046)(3002001)(6055026)(61426038)(61427038)(6041288)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:DM5PR2101MB0998;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB0998; x-forefront-prvs: 056297E276 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(366004)(39380400002)(346002)(39860400002)(396003)(376002)(199004)(189003)(14454004)(3660700001)(6346003)(10290500003)(105586002)(66066001)(6506007)(8676002)(22452003)(86612001)(54906003)(10090500001)(81166006)(81156014)(76176011)(110136005)(86362001)(68736007)(106356001)(59450400001)(8936002)(3280700002)(36756003)(25786009)(107886003)(2501003)(99286004)(2906002)(26005)(2950100002)(72206003)(102836004)(305945005)(6116002)(3846002)(5660300001)(4326008)(478600001)(316002)(53936002)(97736004)(2900100001)(5250100002)(6512007)(6436002)(6486002)(1076002)(7736002)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB0998;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-message-info: PEEplCzbYNG9b+Qx2h4srpjpbAz18PcR8cgQvVbuTTfAZSe5qEoFdHccaVYmpWapuHZBV2h9AYJSjcdT21yRww== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: a94f4375-bc13-4853-d2c9-08d562e0fbb8 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jan 2018 04:14:37.7002 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0998 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- net/rxrpc/sendmsg.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/rxrpc/sendmsg.c b/net/rxrpc/sendmsg.c index 9ea6f972767e..d2f51d6a253c 100644 --- a/net/rxrpc/sendmsg.c +++ b/net/rxrpc/sendmsg.c @@ -563,8 +563,8 @@ int rxrpc_do_sendmsg(struct rxrpc_sock *rx, struct msgh= dr *msg, size_t len) /* The socket is now unlocked. */ if (IS_ERR(call)) return PTR_ERR(call); - rxrpc_put_call(call, rxrpc_call_put); - return 0; + ret =3D 0; + goto out_put_unlock; } =20 call =3D rxrpc_find_call_by_user_ID(rx, p.user_call_ID); @@ -633,6 +633,7 @@ int rxrpc_do_sendmsg(struct rxrpc_sock *rx, struct msgh= dr *msg, size_t len) ret =3D rxrpc_send_data(rx, call, msg, len, NULL); } =20 +out_put_unlock: mutex_unlock(&call->user_mutex); error_put: rxrpc_put_call(call, rxrpc_call_put); --=20 2.11.0