Message ID | AS8P193MB1285304CE97348D62021C878E46C2@AS8P193MB1285.EURP193.PROD.OUTLOOK.COM (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05olkn2018.outbound.protection.outlook.com [40.92.89.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3902818B06; Mon, 15 Jan 2024 19:21:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=hotmail.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=hotmail.de 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> Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: <linux-fsdevel.vger.kernel.org> List-Subscribe: <mailto:linux-fsdevel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-fsdevel+unsubscribe@vger.kernel.org> 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: qsgKRZUqQTFb0YD5iFDICxYFdJvPAy56QXkEB2QVnlxk5Ii3HEO3TZckaty8ixaTBX5V8R4831XfBN9Rb3Z+BbcGB0mOJXDQflZxCDN7+BsdNejzHejnzcpCyqViJSj1QZNH6rejj103c/fFf2xSflIjsR7QvURXH8mXCrNjXo9p9FyYJQ4YJZOFNoZhx/RbXCkJooXyiJfg0TBfhAweELpQKbxYCaHEcxkZ50iAJNYtcmq10fqiv/WsdrwGMCvJpdwMXddRwGbt2bTgbljSR0bg7l3HGqQoqHu/vofKdUtWs8HU3xmrIZXdOFWBViXXTchjYfJUfOFiLmOU86/xxdKtC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rPFO3IZMhhQonNcKVI19Q2+/cRo4B4NEhkzh+aJPLlRnRNqUoYVv+JrxCOga?= =?utf-8?q?VWEvevKWN5JlK40FJMkdoPrkvqt41kH1O+KMWQzT44Y+558Dc+w17o2szWOrR0x+1?= =?utf-8?q?9OOf6/b6YZGiSqICoVzlSkAkLfgWgGSpb2Vj8phQ03KO//ee94909A0vBX2XfiafR?= =?utf-8?q?rvPmf0JjSJ25d17YNBBT9gX+z6tuKXIGoYrwQ+1Q2qTnnpR8DaJhmq94/RzWq7vsM?= =?utf-8?q?4XCWQX4yHHcoSuk8/k9RMFUYTZrVKekRYt61JV6HaqE+UBcsGdW6mBERebdrGEUoJ?= =?utf-8?q?Bbb7PKsKInWQTgX7ma32xKqxliGW2u2M8peOyh+iMvvY6DxM49tGDOwsDOLhSuEc8?= =?utf-8?q?GALQ+zXiWXgYhArKlacVdtKPX/1yb/IHl4qn41jJwXuTM6LTIxb9LIkL7SZDuV8EB?= =?utf-8?q?IBjP7pSDhJx9bT9CXytZbBj9HR9CfdqULDTC1XnT+isRGCMweLMri2rJQyRahuXvZ?= =?utf-8?q?e1sE9mFzNmBMOX6V7kB+GO+W2LyjH8JhAgbbysjJfsDy03XwfweZOC1bP4ULKTuMf?= =?utf-8?q?Yu9A0NzHGbxIZrjKEIGqD0yAQVd8YtuKmxDeiS4FO8Duls0rquEYAmWLMpzrq6ZbY?= =?utf-8?q?TXv5vTIVSUdDLX4GbJuJ3tY6aI+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 |
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; }