Message ID | AS8P193MB1285304CE97348D62021C878E46C2@AS8P193MB1285.EURP193.PROD.OUTLOOK.COM (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 318C3C3DA79 for <linux-mm@archiver.kernel.org>; Mon, 15 Jan 2024 19:21:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 923C16B009C; Mon, 15 Jan 2024 14:21:10 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8D2EE6B009D; Mon, 15 Jan 2024 14:21:10 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 774576B009E; Mon, 15 Jan 2024 14:21:10 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 68D6A6B009C for <linux-mm@kvack.org>; Mon, 15 Jan 2024 14:21:10 -0500 (EST) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 345BC1C0E3D for <linux-mm@kvack.org>; Mon, 15 Jan 2024 19:21:10 +0000 (UTC) X-FDA: 81682513500.20.130B491 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05olkn2020.outbound.protection.outlook.com [40.92.89.20]) by imf29.hostedemail.com (Postfix) with ESMTP id 7B42812002A for <linux-mm@kvack.org>; Mon, 15 Jan 2024 19:21:07 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=none; spf=pass (imf29.hostedemail.com: domain of bernd.edlinger@hotmail.de designates 40.92.89.20 as permitted sender) smtp.mailfrom=bernd.edlinger@hotmail.de; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=hotmail.de ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1705346467; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=prKcv9FFHnoPvw/RQdUAK33x217BpS9lQMjRrsTAOTs=; b=FqeMSiiS3xu5ZJUtkvjNcplf2WYd/ttlbK6bfSyqe0z76pvxitAHrjBUIItcUWTTjtt5un GZP/7/ZiWwAYomxhPil9+8h8wClF7GEb776JmtRwYp9PjVx4F1pNdJdEm0qTHK/l57cBAY okT8SVN+wKP4nhAOPB+hltQ3QlXcwyM= ARC-Authentication-Results: i=2; imf29.hostedemail.com; dkim=none; spf=pass (imf29.hostedemail.com: domain of bernd.edlinger@hotmail.de designates 40.92.89.20 as permitted sender) smtp.mailfrom=bernd.edlinger@hotmail.de; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=hotmail.de ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1705346467; a=rsa-sha256; cv=pass; b=iR7yeGhrmOHghnC11cY0MTtlwl7MzxejiM/Sb+byhXVY3bFJ84nCbTaTD7jjsBVixhhu46 1F1TrYoWetlmbp2iwvQt2Dmo0y/ctskGOyj/2Rshqab9IKBB0MBcj9m3oYlTO1mSfWNiZt VuESdlg4+arDFLdyxjuZpbxHKXL8WyU= ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gL13MTG1jBs/bOZwWbe99GtS7RqPFove1yz7oKIeEFu+4+sdh1YJqzHZRzhj3a7s4QbpsuFz0r3TeOG95xgbxhIJFYtk2/6eQvkqRkhfS4Z8dd8mQmrrkuC9UA/5irDAW5hxool+TNOLFk9cQE9UwxXFCdrvs5Vf5JcKc4Ry+7M0tRXnLpZlo+ZMUxApjuKfZkMGJB93Hnm9/r+ujN2mf2riDOMKnodpKMH1ehjCH61rRsPPT1F/QkdvEOJCtNGy8SPE3P92Jn2zr2ksIkaaN4pYMxnDlKYXVsssAtFxmasG2JA7Q3ocN4O0C2xSIl9da3sFq/v52SErj+1P3O7rEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=prKcv9FFHnoPvw/RQdUAK33x217BpS9lQMjRrsTAOTs=; b=APzSbBSDeZgUcWHONOA3UXWeG90/BLLRoy7ELx5sYv4JoWxE6qKoFXC0yhTSWQOWjPlWERoV0TBndsdySPc8c2oaA3OrCULBj8nUYibDfpbD/xwhvv1Awjmtg6LZPs2qdagzC0EBBc8YnzDt4EndvVCNU1bKKpOeUBLZpsN/tD7svxcYDgJqw0DQXAKcvVk6p602p9yh1FnLFLDkJADCjRldbaegHLxeIfzxcTSO4d9O5p2uhAiw+Vyt7nHIjTa6aeKQcgYDU9pL0Zj+TmNxAB2C+hKPWF9N+eB9gNE5+9eR9NrQn5w7nUIDAdMWZ6Fbkqgt4yL4UF4oCh+FPGT1yw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from AS8P193MB1285.EURP193.PROD.OUTLOOK.COM (2603:10a6:20b:333::21) by AM0P193MB0769.EURP193.PROD.OUTLOOK.COM (2603:10a6:20b:16d::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.23; Mon, 15 Jan 2024 19:21:05 +0000 Received: from AS8P193MB1285.EURP193.PROD.OUTLOOK.COM ([fe80::897e:cfd5:b29b:c611]) by AS8P193MB1285.EURP193.PROD.OUTLOOK.COM ([fe80::897e:cfd5:b29b:c611%6]) with mapi id 15.20.7181.019; Mon, 15 Jan 2024 19:21:05 +0000 Message-ID: <AS8P193MB1285304CE97348D62021C878E46C2@AS8P193MB1285.EURP193.PROD.OUTLOOK.COM> Date: Mon, 15 Jan 2024 20:22:01 +0100 User-Agent: Mozilla Thunderbird From: Bernd Edlinger <bernd.edlinger@hotmail.de> Subject: [PATCH v2] Fix error handling in begin_new_exec To: Alexander Viro <viro@zeniv.linux.org.uk>, Christian Brauner <brauner@kernel.org>, Kees Cook <keescook@chromium.org>, "Eric W. Biederman" <ebiederm@xmission.com>, "linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>, linux-mm@kvack.org, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, Andrew Morton <akpm@linux-foundation.org> References: <AM8PR10MB47081071E64EAAB343196D5AE4399@AM8PR10MB4708.EURPRD10.PROD.OUTLOOK.COM> Content-Language: en-US In-Reply-To: <AM8PR10MB47081071E64EAAB343196D5AE4399@AM8PR10MB4708.EURPRD10.PROD.OUTLOOK.COM> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TMN: [SHb+zh4RstG5HI6Uz4EIV8cNfO6mMuavuQoYeNtxz0ZHc25xJCfsSIX4ELUrdsGJ] X-ClientProxiedBy: FR3P281CA0205.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a5::17) To AS8P193MB1285.EURP193.PROD.OUTLOOK.COM (2603:10a6:20b:333::21) X-Microsoft-Original-Message-ID: <70d177c8-9bfd-4dd9-bf05-50b9d0f968d8@hotmail.de> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P193MB1285:EE_|AM0P193MB0769:EE_ X-MS-Office365-Filtering-Correlation-Id: 02e9d96b-5296-4a6c-a742-08dc15ff1e19 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qsgKRZUqQTFb0YD5iFDICxYFdJvPAy56Q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SUdDLX4GbJuJ3tY6aI+vHRxGNMcvWLWZ/T6vDfcgrwhLPrFpisks=3D?= X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-80ceb.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 02e9d96b-5296-4a6c-a742-08dc15ff1e19 X-MS-Exchange-CrossTenant-AuthSource: AS8P193MB1285.EURP193.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jan 2024 19:21:04.9906 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0P193MB0769 X-Rspamd-Queue-Id: 7B42812002A X-Rspam-User: X-Stat-Signature: g7ne71z8hc8z3azjpoz1i5wo54336xer X-Rspamd-Server: rspam01 X-HE-Tag: 1705346467-35999 X-HE-Meta: U2FsdGVkX1/ubfhyAyOsJVLe0TPHepxzCGUBRDdrj1ANJ8lQZB3iRsL1pqw1spw4EIbCSD+lk3tDOco5ikW+36vwznFmrpYwiTQXbGV6uCr48hNQUydsHeI0JFUfyUKEY7mofqhkpynAWdeNBYaYkIxxCG6jjc9a9hs8cGi2yclZC3OKL5a+SgGSltJHJqaCh2AelqSfE6nPTCt8fj9sR9rzl/2pEaoGku9PlrdbWs++tS2PkIpoaIOzlX3E1Bd2ZuqHUX60/9cgedLgmp7YNiFHlFHjedzBCk4bwJJKJawC78kRXr5NhPW3dojjKH+ADpyvLFy3lRa2meo4WsOpDLRlWHljyS2kNu5nPcKOshb70i1R2wa+buK1TngDPZQ2ubXpbWCGHm1juWwcB1JpqVN1WdkHD3VR82SHmg5hm1Vb/7Hzl2t8QeqF9bImql5EiL8uHiC1ZnkmGZV1X1ZyegBGxPEw8N1AmZK2B+rGiqsYx6i9t/gFNE8fecQgYyThMttLbYHaf45rNpzPLCmymO2XlS9d1rf6iQIaZ1ujRusx3VOzGb9pV3SIwLlfionE8gNaokEgh6HdimQ8DXMFFY9gPrloak+wVtsZJv3U32lnkXSc3oNY/WxLBJcHgua/d+6JYOfuQQblzSKHfFIFAGuFRm69CmGET47fPAiScZZME7J25jG9r8WOTuFKTlXyR713E8h32lBM7XreA1t1gNVBjjLtcG56ABHnNa65NVlxxULiCKtC9LTl5crBdxQCC6Jb+EQPfMAjbv5iHjraFulR3wq+Jp7vY1rKnLOvBfu6MD41dU4/MyyUzretXvQOgfoScjDkkSeqhpn6a2GwJK7lY4pP2dgApB8RWaDpQWB7rzEp/e56HpYkaK3wQcFzcFLciOFc6bOjV5Sgs3DhIw75EMebFwRwXu79jFI2qQy11zdx/RKKmmj34k+ZIGReIPehkDplFs9ShAgY6SR dx+7Mmgy C10IfKimUEmOvUEpAyC09CId7IEiiiUSuDD+Fn9xbhr7gdshe+N9hd71VA3PI2P9uW93Tus72wR/z9LCC/ZWK+gexWOy1ifalF6WSOpBmw2R8aqwvs7FSRvlvEKSqcvrJHDanyj4OZdhaRnIG/GoG2f8ovitnGrjW7DeUeVXkkmQJCGpDxspFfPu6PCIG5LH91ZRbE3IVmsF2yFWg8lvIqxfRZ8CHpZ4yexw0DN/ghufZf4pPYHnyydyWsJi+/6AgTtGATUq2tq81H9UXJ1cZevoLXRYgiAzwxqEknxsdEoMAORSD3TfBLNHoaAbDXf+XQZy9/nZ9jqwsEsi7/K0oeXvTzAl2Fm7oJdqPQnV2Jr7dpYAu0PYMvt+IcOtRdG6l4H7zqGgu5uViKLhfNySh+cN6l1qw7CDoRJHmLbxFUf+l9P+AI6j8Bl7q5pcpmRNCdjLQDNVJmXn+MzOHh9amtpJYRfBm+g9EuZgn X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
[v2] Fix error handling in begin_new_exec
|
expand
|
diff --git a/fs/exec.c b/fs/exec.c index 4aa19b24f281..6d9ed2d765ef 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -1408,6 +1408,9 @@ int begin_new_exec(struct linux_binprm * bprm) out_unlock: up_write(&me->signal->exec_update_lock); + if (!bprm->cred) + mutex_unlock(&me->signal->cred_guard_mutex); + out: return retval; }