Message ID | 20240717200709.1552558-3-Liam.Howlett@oracle.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 88E5EC3DA60 for <linux-mm@archiver.kernel.org>; Wed, 17 Jul 2024 20:07:39 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1DF836B0093; Wed, 17 Jul 2024 16:07:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 164D66B0095; Wed, 17 Jul 2024 16:07:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EAC506B0096; Wed, 17 Jul 2024 16:07:38 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id CA4E46B0093 for <linux-mm@kvack.org>; Wed, 17 Jul 2024 16:07:38 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 87674140C74 for <linux-mm@kvack.org>; Wed, 17 Jul 2024 20:07:38 +0000 (UTC) X-FDA: 82350329796.14.F0634F1 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf23.hostedemail.com (Postfix) with ESMTP id 22D90140023 for <linux-mm@kvack.org>; Wed, 17 Jul 2024 20:07:34 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b="ZIA1iP/G"; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=i4pW+gnO; dmarc=pass (policy=reject) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector10001:i=1"); spf=pass (imf23.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1721246825; a=rsa-sha256; cv=pass; b=d5u8mznMeF3v3Ynq1OoPNn+GEh6Dj5M6N5u5A29cstBRBT+oR4jHaMkcFufkwlLyhh0uU8 nhSAvqCVcWNQkIIV9/FiEjWGtM0CFwB2Mp1ovbT/n0hYHDqCAy426dqbItx71wSPw5BFX0 u8l0JdY59Ol7QfF1yhTS2lG3t3BkeAQ= ARC-Authentication-Results: i=2; imf23.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b="ZIA1iP/G"; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=i4pW+gnO; dmarc=pass (policy=reject) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector10001:i=1"); spf=pass (imf23.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1721246825; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=wem2AJBoTGHtBckyqvpen9uiSUKgs9mhKNjHQHA0o5E=; b=lYuNBDGTJ084/3ck/3LZIkqmw29s0ODubLqFF1k62B3Jir9aOknGd74QkvBgxnCRzfDeK/ HvX2Ko1Hprgc6hGTA+JelyEmsxpbAxRpVZhPFYlMvVTAl8YaKKugjyfxUSnHWXLBB6uged ikgh1mW6wRCoxln/folGPbu1xk3Z5mo= Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 46HJtlDm031584; Wed, 17 Jul 2024 20:07:28 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :content-transfer-encoding:content-type:mime-version; s= corp-2023-11-20; bh=wem2AJBoTGHtBckyqvpen9uiSUKgs9mhKNjHQHA0o5E=; b= ZIA1iP/GGVdIiWFx7zHprxM6H79jnoNvqLFAdnXXJwcNikN47hdhnizNe3mEm/0o dCyYmfSSy1SqjAxqG5DL4TFcoqEE/UwfJ2Z0AtnoVNCXPI/dfcSljl4w0P2mbeer VYWJiaxTXStGpAcymAe0cbbkl3JIlRq3fKrXShghKndt/rnG8pVf2XJKffHrvyYN J4g8QONGr0vNoggT5U0JDJRg+TzpMWtbtKowUd++c59EOC/z6S0uuEgy9UoCPOlr i3aCJWS/Uv8yVJN4j/XcMuNE1K7ee6xRKpaZwVUIqdkoP9Ux4t0mOZpzSRY6LjCU USotMqNbNdgLiNtQwIl3oQ== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 40emhpr0qf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 17 Jul 2024 20:07:28 +0000 (GMT) Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 46HIrJXk006940; Wed, 17 Jul 2024 20:07:26 GMT Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2169.outbound.protection.outlook.com [104.47.56.169]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 40dwey1fcb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 17 Jul 2024 20:07:26 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=W8nJvMHJBbDc4gPv0yTVQSd1pgBxNo2fvb0Mj1JOa34/PCKMIsgjYijjAveYEddgNc9WT21QzeAmZYWmwjr7q0rKcDn8MS/oscC5aiJUmDZSkHkEfcap/rkSfDXpxCHvg7eOA2t3ccSCXTBcaATGQmTRxIZZfok8q31Tyu7fWUbpa7voB5u8TqJV8EvmDjcl+XZSWabw0gSTphC5XCB+GId7c1j5lp84J7FLU8KLQyQLQvJ+IkNag8OZylxEseUhzxt/215f0NVS2Zxqvg7XIMHtdLbYvcFBOGeLXg/Ixxe88Q6iCvUmyCBfDjT/kkGerzohrFEdtgjRG/mVnxk0bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=wem2AJBoTGHtBckyqvpen9uiSUKgs9mhKNjHQHA0o5E=; b=Bd98euYxD7WOZZaqpN29GWFXFKHDO0iDWWBXnc60ERQQ37/EE02cp/xI7+ljiPdbNhBwILuoHnwKf7wUWmaU1TJPjECqT2edyUpEAZ//PVEg5Zo/DMNYkv4aIPoPiixfT82180P4kaI1sgzo+W//VjCVajQKXG6SLtoC8k5WFhiOcqivuFvBrEpSmWU9PL1Ne0oN5/CVZoUtBtN4z3RCerXQPlgFr83V/NuSkSHgLawwZBvI/PFUQl0kTxHIvJJo//eL2fN9eaSNwl9Q3Avxwdryf1v9mqd3aBbCmjUmvyep5IeqAN+TCJF/yDGyLjcCQkGjmarM8WXqglKGcsoZzg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wem2AJBoTGHtBckyqvpen9uiSUKgs9mhKNjHQHA0o5E=; b=i4pW+gnOSVnA3s7/ntzREOViaBZMNHjlfQNnO29A4x52ADTrbHbMKUxi6u9yvPmPuYIRlO4QcvchTjTxZ/x1gcCi/QZjwbAVK9o+Ln0x+U49VwDJ+5hZCVtSjGnccZSlUmRM9cQSk04duA4dPoiublgUGnIWYFb6m0Hu7Hiw6jc= Received: from DS0PR10MB7933.namprd10.prod.outlook.com (2603:10b6:8:1b8::15) by IA0PR10MB7303.namprd10.prod.outlook.com (2603:10b6:208:40d::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.29; Wed, 17 Jul 2024 20:07:23 +0000 Received: from DS0PR10MB7933.namprd10.prod.outlook.com ([fe80::2561:85b0:ae8f:9490]) by DS0PR10MB7933.namprd10.prod.outlook.com ([fe80::2561:85b0:ae8f:9490%3]) with mapi id 15.20.7784.016; Wed, 17 Jul 2024 20:07:18 +0000 From: "Liam R. Howlett" <Liam.Howlett@oracle.com> To: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org> Cc: Suren Baghdasaryan <surenb@google.com>, Vlastimil Babka <vbabka@suse.cz>, Lorenzo Stoakes <lstoakes@gmail.com>, Matthew Wilcox <willy@infradead.org>, sidhartha.kumar@oracle.com, "Paul E . McKenney" <paulmck@kernel.org>, Bert Karwatzki <spasswolf@web.de>, Jiri Olsa <olsajiri@gmail.com>, linux-kernel@vger.kernel.org, Kees Cook <kees@kernel.org>, Jeff Xu <jeffxu@chromium.org>, "Liam R. Howlett" <Liam.Howlett@oracle.com>, Lorenzo Stoakes <lorenzo.stoakes@oracle.com> Subject: [PATCH v5 02/21] mm/mmap: Introduce abort_munmap_vmas() Date: Wed, 17 Jul 2024 16:06:50 -0400 Message-ID: <20240717200709.1552558-3-Liam.Howlett@oracle.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240717200709.1552558-1-Liam.Howlett@oracle.com> References: <20240717200709.1552558-1-Liam.Howlett@oracle.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: YT4PR01CA0459.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:d6::18) To DS0PR10MB7933.namprd10.prod.outlook.com (2603:10b6:8:1b8::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR10MB7933:EE_|IA0PR10MB7303:EE_ X-MS-Office365-Filtering-Correlation-Id: f7f43bfb-d2fb-4ba5-16b8-08dca69c0f2a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|376014|1800799024|366016; X-Microsoft-Antispam-Message-Info: x3mJTI5lRr8oOddF8b9f6nxCpq2Eh1YDmnQe0rVsLtv3mTUuGysIQHZPfnc9z5GgoWUog4j93aBdb71fXOZIyZz3rRe7JWLaOHmVA5qQF1jDyiyhaPy0VI0LC3XnIh03BYZpvMfD2NVPP/nUFs/JvPuMqWu5LwIl496bDHexzcuOkuUAenmEXlIbAIRFvUFqL6ozEpxHMOMbhrOXmhcEb8UFfknlY+I2QLOBX6mkNa7BYZwRjLKCijP7jQuXfrXatEznBx7mUPbVwuy/MZxzYLauldfPNCJjlw0aUTpIpxrFXEgvuOC66NfTiQMJBNr2+KtpdFAA/ogKNU2MBsQVBaGXBJ+XXVWlxAgXPE/QFzizUQBRs6lWsuSt0rckZysqHKoZIrcVqFoJqY48742VjU6P84fDd8xiEJNtIk3MccAAnu6cG2mEu4BuCM0Ta8t4ihiQQsLRgTB5O250pTtlysUnoJxCLPiJUN4qVFcWe3bYJ1hUB0gmN2UGKRTx30R/9YkjbN+F7BiylpTYBl9EkQPKf4gEps43Tvhnz0Ro0jpMf8JL/vKwV0xXPWKgUsXgf33DvC3Es+3M/5h0KWalmHLmLyRmGEYZxM6nloGWxgVBuwE/t59nJG7t/V11BP8JaTB7z/alY5jiUwzbf0XsWYpeRmbfWRMtqh6BQpkMfH0EM4FJAtivbat3PtdakxAIFtfn+w5gYMoAgYfJGYNG+QOYnC7PEQTmGav+ds5IKEy+iDBOgasZX83y2YotHcYIw6nL0cp2mrSMv8iW6lHFJifbJSk9s10O33vQbITvRYv8PS9I29FpAQFm0/lFik2PtyB/kgz0peIfx76bCQ/shIdRHrXh00Mn47iF7+z1uTqncjCLEj6St+rswc2lbcDGrhwgV3A/MlpZsNeADoo8RcqXbccCfv3GBY94rzH7pq6Ndiw4GmIw59RGevXFOrtf65d0W77E6sI3jhzunK/JcUU41pqYbYt2f9extmqfnumELiiTG2M4XXj2SEO5flTGcP6mLT7ICkRXIXwdx+/3+iR6Pgfycr9SEK75Sl3xpGztrgjP4nBjj2cHlGvQACrcSO76MvdDNFqcrHRO9NioW0c8K29+CvRGZ9uUUSzLb65v4ZSv8Tly2WId2BECvxRrDRQWstv3/uYxH1Pydy+xf8VSyJFeZTIsFLo1f5+fN/KWrGBjyvGgteOXzH7LbdeoeKwMXfw8e8Y1QAq0uHus8F7LYay8CIhxRq1FolCymSOaXhqF8Tp6u6nnexdJSp1XAmN7JLBcdWDklBn+LhmDNOK05PuYvtdaOF5MJh8ZAdiw8n3u8hggrKDrgkAjGPL2dHO1rG3H53xHIkXqcRdiRQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS0PR10MB7933.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(376014)(1800799024)(366016);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: SOX94kEo2GhU2l52u6K2vsmOnJQ/Zamm8yn1LD0xrwoQ4Id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TWRajZ3INFNDr8/FZ3qwVvPoINJF01o+gYxB/ZQcf1b/Vfnbf0HlpfvDwvp0sHRj2p4tNWL/sw1XQ6pSGacIIVYE+K+YSOKRtKnwOa/kKLvfdi1V3MxQ4rnTx03P27p2Mq+DZmTSfzntM1jWaFndmMVIgkh1Uu4cALqlFLCRSvHZx/S2CBBTTD3YBWOWZeQd0AGl/YjPv02fciFvAn2BJr2OHao0CYxHIRETNZMRdSi7tSAMse1NekO08BDR66mfC4Kc9thu0IQ8eZOvtppGis2yjyiVJWYWSNBTSysW6igiacojplCOdiuaqRraiop0DlovD516BLEBhmfG3/evrTk5Y0NPHYJvbuk3qk0spfLv7Yoecamn70MtEQ624qha29GNK40ulEws5kLudWjH1B1kaHSi4p4eYT/t/EDdoxOZaR1orpxYWh/cP743cWW7vw23mbLVnwDeQFR1pjO X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: cMuIu1Z7h9LrSz3cEydnUdk1zofbu0MPZZJ9Xguy//0aCLXqyUPxL+VZYnykhVy/FmtdxtEmkRGC/IsTBx3DY+xc2KBqRuc7aoPVZCU17fL5r5T9f27Kr3h16B+CfXVAkiOzdStskcgfUt53n9lWSyHSM6nBae3CTtUjs32uHhQm99m5T/YiN5q3aZtpdt9kS5/b9A8KY+Gwls7wqHgFyl5bfspvYoCi190/NnURTEAVoZ7dmkOOYXm1AcwROY79f+gBfIcfQFGIsWE/LdcS/fu2b5OGIBQFY+DuoEFuNb3bvF3z23Kpiruqrxnv9/LP/Fq1ACegWkQXzq+T//J2rl4WypDsqLSbz9xl1EYBq6C4lsdixFjLhuXuG8P86RqLndYtZxNn8H96vXDQRwIYf4Q0y16xGr5nqSj4fLIkWWFYyTHBMohbVCBwyvIbxeIImsn807ql2Ca9/O7U+HekCfDlqD55pnmlWftx+jpqzv/m+4WLyB0wMgeeex2LvQaacCERV4BC2/4BSiaNRbADQgyqak9lgr6VqMzJ24ErSToROQgaap41Sr55jX9e0aJQh72lQRvQNY3omU7rdeNongtmdh2mhY2cY3zdf/rwbeY= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: f7f43bfb-d2fb-4ba5-16b8-08dca69c0f2a X-MS-Exchange-CrossTenant-AuthSource: DS0PR10MB7933.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jul 2024 20:07:18.0283 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: EjUkB1chtJUogZV/hlklPwq2AXKFvgRhO3qQUuQPLhhzf0sxqHGoCjR0C/+hHegkX1649nLga6tyteBXUeWsRA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR10MB7303 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-07-17_15,2024-07-17_02,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 spamscore=0 mlxscore=0 malwarescore=0 adultscore=0 phishscore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2407110000 definitions=main-2407170152 X-Proofpoint-GUID: 659WKp4VXWsHkCKUMiFhSCsM0zMKIQwV X-Proofpoint-ORIG-GUID: 659WKp4VXWsHkCKUMiFhSCsM0zMKIQwV X-Rspamd-Queue-Id: 22D90140023 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: fxtmzfngahieez6attyfr1cdw5684ada X-HE-Tag: 1721246854-811736 X-HE-Meta: U2FsdGVkX18wTU1+8bNkvnTuopy6JMm4ZEhlM9yDX4FVUrg/hmF3DSqRA7vcyqwOjSlKILz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tuHaa47X5okl8BB7/mPbck8HLlG8lkex5jdDtAafLqQdEem1xHqBqlPBcJ81si/5jsqe9Frq+DSlTQd4fjSKy7yrZh9ejt0H/FwGLLxNRshdllGaD4Rpp1c0vtPCxNGi/QYjTRzyxpdGQ8YWyCGpR43fwqvOstUeOTnw5MUbgRU41LdGTKXmyHKtwt6OxYjVsMAFBki8tsPq4LHs3147/Fgab9ZZ0pIyM7Qx/qf3MMnZ1m/gcVBxcpNmPceC5eMghedRZbCbxzytF6/vOzGGKvMJv9BN81+XeGme7wpdQCpYWT+SlOvU+huuc4C5hPuoc+JKBgUhvT96meV1uUcpiIYGCsm967MlBkDXMV48jJp5QrZXhjlSqjdqr+tgbYHjsxzlnusYLyRVjV4WnxTqaSogtAzJI= 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 |
Avoid MAP_FIXED gap exposure
|
expand
|
diff --git a/mm/mmap.c b/mm/mmap.c index 28a46d9ddde0..babfa50f1411 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -2586,6 +2586,22 @@ struct vm_area_struct *vma_merge_extend(struct vma_iterator *vmi, vma->vm_userfaultfd_ctx, anon_vma_name(vma)); } +/* + * abort_munmap_vmas - Undo any munmap work and free resources + * + * Reattach any detached vmas and free up the maple tree used to track the vmas. + */ +static inline void abort_munmap_vmas(struct ma_state *mas_detach) +{ + struct vm_area_struct *vma; + + mas_set(mas_detach, 0); + mas_for_each(mas_detach, vma, ULONG_MAX) + vma_mark_detached(vma, false); + + __mt_destroy(mas_detach->tree); +} + /* * do_vmi_align_munmap() - munmap the aligned region from @start to @end. * @vmi: The vma iterator @@ -2740,11 +2756,7 @@ do_vmi_align_munmap(struct vma_iterator *vmi, struct vm_area_struct *vma, userfaultfd_error: munmap_gather_failed: end_split_failed: - mas_set(&mas_detach, 0); - mas_for_each(&mas_detach, next, end) - vma_mark_detached(next, false); - - __mt_destroy(&mt_detach); + abort_munmap_vmas(&mas_detach); start_split_failed: map_count_exceeded: validate_mm(mm);