From patchwork Tue Aug 27 17:15:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Liam R. Howlett" X-Patchwork-Id: 13779877 Return-Path: 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 69CE5C54731 for ; Tue, 27 Aug 2024 17:17:43 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 78C576B007B; Tue, 27 Aug 2024 13:17:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 73D146B0083; Tue, 27 Aug 2024 13:17:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 58F276B0085; Tue, 27 Aug 2024 13:17:42 -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 3CE656B007B for ; Tue, 27 Aug 2024 13:17:42 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id D4A748170B for ; Tue, 27 Aug 2024 17:17:41 +0000 (UTC) X-FDA: 82498682322.17.F1ACA58 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf26.hostedemail.com (Postfix) with ESMTP id 4958C14000C for ; Tue, 27 Aug 2024 17:17:38 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=DsyRYqGo; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=uJ6QKKge; arc=pass ("microsoft.com:s=arcselector10001:i=1"); spf=pass (imf26.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com; dmarc=pass (policy=reject) header.from=oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1724778971; 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=1JzOPOcQIWMiXrR0IXPSoekk1cUkQlxXayMIVlzK4LQ=; b=1WcUwvqYXaxrf15EhN3ZsF7JW6484C+Hl9OqeA9qyOOUmIfV3FCa+C1/ao98ENifCGP9dm oelUOPyUMKX+l+viYkShCqzqajMWZVFgbN4QyTuqSHG03uNVokWTFdc+nFSb31UdPERjXy OgzLfXwWQVYb4oFtw+XjyVPXuTq+UA8= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1724778971; a=rsa-sha256; cv=pass; b=uqS8PqPHq8KT8lI+4n2v6xGtnfX4fhlk+x930hY+K1UKI8ZGH3t3wg048spoSReQXA6QwQ VeaxBG/lBCplDTYs6Rh1y9x6aK7vP+eAropgvX1JiuIGsLrA2yEvPRaBJFzdtcdixXeg7Y 8ICSOWh4c9SwBE7Lc+O+aMesvI9KkEg= ARC-Authentication-Results: i=2; imf26.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=DsyRYqGo; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=uJ6QKKge; arc=pass ("microsoft.com:s=arcselector10001:i=1"); spf=pass (imf26.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com; dmarc=pass (policy=reject) header.from=oracle.com Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 47RGiTRd012383; Tue, 27 Aug 2024 17:15:59 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=1JzOPOcQIWMiXrR0IXPSoekk1cUkQlxXayMIVlzK4LQ=; b= DsyRYqGoAoTksoQyHdi5syQL14eZ59196LxHB8Cngz9suNzRB7B85FfFpC3lU3zB +ZGEIwlq+S8iiG4cee6mleHw9o/aNSqZdm0Sitw+ZtHJjpmV2PVv1uapIsRjWsCS s0MFa2wg0uA9CT8qRm72ugG/Cpxoo05HYzgajK+XLskzG7ZMFtDbAW7Bu8QByecF HXRe3LJj+rfH6dAuCqSsBf6QczMctoYgBMNIHpxHzlcUwzEJtSgh/hAMR56+8mfp tjsuRoNx593coDiTPSZD36VuyWJiECbpQEwin2MspSZdVtBMpUpYI/LiAk92AR6U Cx/IfbgJv81koq1XJdGLOg== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 4177n465vw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 27 Aug 2024 17:15:59 +0000 (GMT) Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 47RGpiir010650; Tue, 27 Aug 2024 17:15:58 GMT Received: from nam02-bn1-obe.outbound.protection.outlook.com (mail-bn1nam02lp2040.outbound.protection.outlook.com [104.47.51.40]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 41894n8r6s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 27 Aug 2024 17:15:58 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=JKBDP/GOAn0fLfO+42T5rg1712Vm6alLFIDpjr69zYAGMmGq5UzT/1JBuodOXDH1pnNY6w3Rd0uAU0ryXzQJ8wvjBUGUL6UsaHYh3p3ZJK2I8oYo4OBMkadyNxeN/PcCeN8thkbxlaRqvCfDvskQOQejKFiFTgveWPDnkxIiHlRJSkMCRjfVD3ccByDp7gc24/3rXsuVj7Gqo27T40ahT6ie2O3EFFbwv6WtErtQXwhXAdApsKkOSyhuDT/oDTssFaG2/jGmat6jRoBYH+ainbHK7GE/OXEYnaqz6suXLvSOIZw3ZF5mBM2ZIG3RuNypZgGMHxolm/PcGALyuv5vAA== 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=1JzOPOcQIWMiXrR0IXPSoekk1cUkQlxXayMIVlzK4LQ=; b=yUbc8P8I/1gpVvh6/Qo+MGWEvfUKWu+DOEJeWtOnhT4jHTAERs2ShGSiHirTG7nCCQAcSjWsmP+/rNOUmxm2RvdAPWEoHPjs7UunFBXfO6HqA9iQlWXVO1RcFAhZrxd+/+gb7Lau/Z6m5O1vVwmb+b8M334tixhTi0DEnRp4qRjjhC8OzzBa+OnZBfBUJdu00WHAuHLNCXqjuuRV8gF1hMLH3+wHozBpBvTpJs1qI70G7jTk6uqskM+LpQhq7IbhzHTx3Ao+P73SSW80mtjRxdjHyVvMa/XKWNqN5MmVH8N7+UilAy6dTIp40ACHp7xoMlUKAyOdQemtMksghdqFIQ== 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=1JzOPOcQIWMiXrR0IXPSoekk1cUkQlxXayMIVlzK4LQ=; b=uJ6QKKge/NF4qzuEVpvkWr8j82pEQ3YIJQTR37DLw/OdBXSIifL4xJQ0bpQuS3zOKMl5kwCRRhh/H/UQDFNgV6nPiQeOsCqLcgT8Azy6Bj1JafT6f26I8P1/7UZVqepg0GxQ9Z33d6aTpIGE1uMs2fhjWKILLl0Njx+gnEuoV0M= Received: from DS0PR10MB7933.namprd10.prod.outlook.com (2603:10b6:8:1b8::15) by SJ0PR10MB4782.namprd10.prod.outlook.com (2603:10b6:a03:2dc::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.10; Tue, 27 Aug 2024 17:15:53 +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.7918.012; Tue, 27 Aug 2024 17:15:53 +0000 From: "Liam R. Howlett" To: Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Suren Baghdasaryan , Lorenzo Stoakes , Matthew Wilcox , Vlastimil Babka , sidhartha.kumar@oracle.com, Bert Karwatzki , Jiri Olsa , Kees Cook , "Paul E . McKenney" , "Liam R. Howlett" , Dan Carpenter Subject: [PATCH] mm/vma: Fix null pointer dereference in vms_abort_munmap_vmas() Date: Tue, 27 Aug 2024 13:15:49 -0400 Message-ID: <20240827171549.273063-1-Liam.Howlett@oracle.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240822192543.3359552-16-Liam.Howlett@oracle.com> References: <20240822192543.3359552-16-Liam.Howlett@oracle.com> X-ClientProxiedBy: YT4PR01CA0104.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:d7::9) To DS0PR10MB7933.namprd10.prod.outlook.com (2603:10b6:8:1b8::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR10MB7933:EE_|SJ0PR10MB4782:EE_ X-MS-Office365-Filtering-Correlation-Id: 299eb8cb-54ec-44fa-c95c-08dcc6bbe82a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|7416014|376014|366016; X-Microsoft-Antispam-Message-Info: uNZl5YjP48OQVfgIu4w/RaTEUZfwhXtPW33w699MWXHP85dwtvXQS/+DB36vB6nQPOFY6Nh1QyppYzjRkSFwmaGV2vkUXM5ju/4J4S88ejeUalb4KXy5B6SGS85uV8+MH8KDaN7suT13qhHm8GNCpvsPkbkVMMNmduTEJUCUoFWU801DMPGb2icjanfeaXb7hsQEaXO7JCQ/X5OPL7STHsN2DJcTsO95Phya50WpqbCs1xRpC3FbGFX2y/JMkZ+qh8gGwjyc+YRd9IQGTjeuGh4i43b0X/Wae1WHAekltheUNI5ZaBXyyMRJQP0i7M+NfHxJOJ5NwU29HtjK81J4SMlcJu/P0frYcBwNds/cmssUcaeGFD6AIbM9ADgKYBR9WBWbWa7wCx9Y++ByYwwcVrHOsaEJ6pP3dM5xDCMJaEsBtgIkm/ZgYVLack1S9k32p2ASpRKf4Kh0PDfjnDwjSW5TkGGM7URhjsJgUdePgjfVYul409Kuo/b9IfLSKZYCeapvbSOYVsjs7ThfRKbZqb/tAJPaUdiVcyAKgdZpeJuOEr60BqRBn+BSnhYQZsbH/hnyqMyv+ZxQDhheLCCA2STYfLKaXvjjNA7YHq246QfDy8n/x+F4szL447HdX7Qmn2SD+HTc6OEqhHjOJJWnaxVoQpuqb4L27Sx9msvivEpHRkQXpjJUh8WJ4tsBEdIFsxHL2VwBL8W9FRMu+ljM3XkwsEK3V70XjLZzsy0StbxwQcpi/F82XAjeUALJ9a5lTX+XIpF7eg0jV03TdK2YFn6t2+aN783IcopsasPbDlspm7Hhn0tAmd2mRZg7E/peNWIrAv1TBDB0ti1xzW/V6lR/SEKNQ57mcyoQzE/TgxpEhranCUOzqC9Rj8FIbtycekVftnJg8efV3BaS2tKRdVBep5/m8slZNIL6p8QC+FzAOExohNEQbF1IHfEMweUvu8SI7+8l+25tnnwWv3rDb7CLmHgu0ZPLIs5nqhVQFy9ZpDs5pxW3u4FqXiRmG5ge/hSSwOhFzxB2MscLACjSNjf43bArJcMVdzviHFRNt5kwt/EA28b7Ik5DxtunRagCC9F03yAnr019c5jSp6DlDyi4Ki7sAnaYOpzoSqrSkPL/XtC40EYJH2fDtX/odK/wJHFres+oSjd5PtUb+ewa5QcEd/gL5H+kjWe18tvijgaBprOGqBWdtQkkIDm7AQzm5Ana88wW0mOc0Y1BbGJ5IKCXxUIomRZRYDFtKCwt9SJfRPRawgQa6g1yFZLXVUXbuWHM235ip3xcv+C/t8HsG2IDC6dfbkMZZrj+kZzrTSQUJZBAGKY30l2n50loNiqqVf6FUEu3fcRoJ9ZNI6BwqQ== 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)(1800799024)(7416014)(376014)(366016);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: eq28FLjrtrujqmKzO849kmv7HhlTMnjx1yEhC9hqIkPJy/XS6iTIUSX3NrW+KSVUY3FQQMWKnTlc1Rrqg48Bycpv+9yu8sk0l1p2KBxpt25EulrMBV3fwLl71vG3urYjqfDMmsc93K0n3r3OnJOd6CRnIMGm6UgqAtBSq6N+Q0MlEIgFBuOdTI3oYVS84Nle+kCwfz/bLgM5BVFJQEehCaXxgJl4DHJgowl043Ps17XCsZSzfKhYUjdUsl8Pyx/xX+v3yDI6xLJggA1yaWsEGp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jhNgvJcH/ykmfWePGzjFNlfOIfnkfnqQDUmhVldpAxsI14bpfjAGd2M5O/2TRU0raK9defosUqhE/fpgOQSDUsJ70s5PuOitG/ybeafShKAv/N2wr+jORxu7SHhaBJCqwnBUXiGDmIXs64//UylN59qD2CpASKnkXaFMVIOzeMJYPFLcW/mm+0tfbPs2RfPp0L2srQXqSWWst3Hkr7hYRr3eHuFDnTsLMbpFJ X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: c07SWp9Z/49NhjeySYeQRhaqHZm89kBhzbeNF6B3aAWUBGA1LwZK0HvezO7pOEyKJ5Xgxw93d0aPiIC+TPjy/Lgpp4SceG0hEOGiQl1qx5iifTAvD/Z2SVYJ6KZhsJb9/77giI/NzJ+v7m6XyD51aDGu5hGfH+D7NcujBFRUNAFBUIfacVF2zvVmXNn8sn3G50HQd3K2NgR9IUiHCblL5rBiYuB9pLgkyck5rJ1VX77lXR50wfH3HumYGC8YrjK1JA4IARewNvBjAapNd1amQiox5Jcbqd2oVTwex9pwunGEOSunsIQhu/Z3Cmp9YG4s2DjXqP9IwqNwfzvI5YU28AMiQxrQ1ZPgomsdWqskS91kOswWc4Op22uHt6+1K8pl8fv4MuZkJvNhBTMcLMdb5UHQcZIRdB92CjL624zlDLedlYIuFRSk6d4sNjbHvP/JJy2cy+vc9M0Ep3n9kY9QbICrOJFvGTLBZovzP80r9bV0VZovamT9vCBjQHM6uc7iR77kBQsIC4nBMifCIS64XDZ8KunoKLZeR/Sod7hqrzNP1NGFJNmynDhUs4DvcPv/wbrtmFHT/a8VIMg0VmS7uR/KIvpA9sseLYR92fjuRsw= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 299eb8cb-54ec-44fa-c95c-08dcc6bbe82a X-MS-Exchange-CrossTenant-AuthSource: DS0PR10MB7933.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Aug 2024 17:15:53.7742 (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: v8XsRLbkuGHhG1FMlAIbMlznYAg1DNJE8Wagu+kmtUX31ireAbTa/s3gZvYSuOkxhk5ytWPHNxbYe34YPP6gYw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB4782 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-08-27_10,2024-08-27_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 malwarescore=0 spamscore=0 mlxlogscore=999 adultscore=0 suspectscore=0 phishscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2407110000 definitions=main-2408270129 X-Proofpoint-GUID: iKFpJCRVF_nUn38Mi9Jh7wqRkr97bBSB X-Proofpoint-ORIG-GUID: iKFpJCRVF_nUn38Mi9Jh7wqRkr97bBSB X-Stat-Signature: w3i6y3t6q7smyh114r7unxerh9icz8ye X-Rspamd-Queue-Id: 4958C14000C X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1724779058-412115 X-HE-Meta: U2FsdGVkX1927Z7smi3rddUVqzfFW6tNjHqoU3iLF5H4DWus3PtVXHCayzojF+Bv6NPCJ/kXwxa2HwaKql7MYP8fo7n7EzVtGS6DZPi+NYEndF2VB1+967E7h06WbMvga0M2i7N1uhapdMAm4L0YjSokeqA0XrRiYKwcgohteX+ICAEq5/OJhl4MnuUUGNb9Ah+OdRh2T+hbh4wTR56E5o2SoOij7tmFNUYNQXdciYgXhlvqU8Mf9sk4SD8/4WDoKdhCqpf3LyPtycCHPLWXsP23K2ImLjCOFt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DFQlLVVCu7n2euBm35nbgsp6OZwBqzb58OK1Vfp8tLqP67NXxw2sEiB8oTtC3bP6/IuoFqA6ThSESg80Ib65VXnkzhUxyYFuop5LZSM/wQl5YuhyFkzYAqoXVn7LQCA3aerjzsLvp0G/nWB65MFHIjci7mrcq95cNg5AKNLtgkMFH04nt123A0xKUwciFlmi1QW+TZDUvinbd8O2AryKbBD4A5sUA0Gupzt2lqJmRRsfuoTtyxLL3roWA5Jseg== 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: List-Subscribe: List-Unsubscribe: From: "Liam R. Howlett" Don't pass a NULL vma to the vma_iter_store(), instead set up the maple state for the store and do it manually. vma_iter_clear() cannot be used as it needs preallocations. Signed-off-by: Liam R. Howlett Reported-by: Dan Carpenter --- mm/vma.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mm/vma.h b/mm/vma.h index f710812482a1..5f525d723390 100644 Andrew, Please squash this into Commit 131e4ef350fa ("mm: change failure of MAP_FIXED to restoring the gap on failure") --- a/mm/vma.h +++ b/mm/vma.h @@ -173,6 +173,7 @@ static inline void reattach_vmas(struct ma_state *mas_detach) static inline void vms_abort_munmap_vmas(struct vma_munmap_struct *vms, struct ma_state *mas_detach) { + struct ma_state *mas = &vms->vmi->mas; if (!vms->nr_pages) return; @@ -184,13 +185,14 @@ static inline void vms_abort_munmap_vmas(struct vma_munmap_struct *vms, * not symmetrical and state data has been lost. Resort to the old * failure method of leaving a gap where the MAP_FIXED mapping failed. */ - if (unlikely(vma_iter_store_gfp(vms->vmi, NULL, GFP_KERNEL))) { + mas_set_range(mas, vms->start, vms->end); + if (unlikely(mas_store_gfp(mas, NULL, GFP_KERNEL))) { pr_warn_once("%s: (%d) Unable to abort munmap() operation\n", current->comm, current->pid); /* Leaving vmas detached and in-tree may hamper recovery */ reattach_vmas(mas_detach); } else { - /* Clean up the insertion of unfortunate the gap */ + /* Clean up the insertion of the unfortunate gap */ vms_complete_munmap_vmas(vms, mas_detach); } }