From patchwork Fri Aug 30 04:00:50 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: 13784218 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 AC916CA0EE4 for ; Fri, 30 Aug 2024 04:23:38 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2ADFE6B00A6; Fri, 30 Aug 2024 00:23:38 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 252816B00B5; Fri, 30 Aug 2024 00:23:38 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 055976B00B6; Fri, 30 Aug 2024 00:23:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id DB58F6B00A6 for ; Fri, 30 Aug 2024 00:23:37 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 774631C63AF for ; Fri, 30 Aug 2024 04:23:37 +0000 (UTC) X-FDA: 82507618074.16.E5A0E57 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf18.hostedemail.com (Postfix) with ESMTP id 18DBF1C0012 for ; Fri, 30 Aug 2024 04:23:33 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=ic8hQ9pP; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b="SVdHwDT/"; dmarc=pass (policy=reject) header.from=oracle.com; spf=pass (imf18.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com; arc=pass ("microsoft.com:s=arcselector10001:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1724991714; 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=X3TVDEXy+8mIis7fJmNHmIG5dYhcUaHLYXCY/rRjgL4=; b=BSSmPHI7cEhpan20Elhb/iR2yXbTYWH/iciiXvIC1pWauiUgTX1hUpnu9hZbdk7LaDMTgs 8Fv8VYCMG9S9Gn2HZ4g2MOH1U9tgMeW8a9ORFyDQSTJT+YrmlQ+xmcNXyOhRLalb+MgdoA fs13IAiP/doxGQQwXkVDrtMJwp6ja7A= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1724991714; a=rsa-sha256; cv=pass; b=NsT7jVqkq1Hs008p9u9W0o+ouSE9jYVCAHMiAIflWCRfK2sbq9aQ0bbH2HyrjnVnodwQR7 uyQdsLJCTGEW/yhk5h0WVmEE7f3lRS7gS+MjB1w5Khd9VYrbO2Lfj+XfuNK8ETeS2rVPow m1Y1buRUPnLsnjNXqojIqpOmlNPmr9Y= ARC-Authentication-Results: i=2; imf18.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=ic8hQ9pP; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b="SVdHwDT/"; dmarc=pass (policy=reject) header.from=oracle.com; spf=pass (imf18.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com; arc=pass ("microsoft.com:s=arcselector10001:i=1") Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 47U3MisE024297; Fri, 30 Aug 2024 04:01:33 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=X3TVDEXy+8mIis7fJmNHmIG5dYhcUaHLYXCY/rRjgL4=; b= ic8hQ9pPkBNxwDq4NPuxoJOSFC5XWqvCWHHSx4TZC9qPEM689PbNRFayqne90gBm 9z224mp4mt8tbAfXS0wdQmepwa0Hld2f0rWCsBnDffcJsLeT6lvCiFswvxn2GSsl 9DSfPQhpdDMND244jFKqVEkKKA5pRqX5CEYmRUC4E2LObUGFmr1mJ4K2XFZ30swq sBcCGoO4sLpA5h4nxMZv/NFUGwjE7hGnavJYLEqnoJbamMbysx6UgxmuRvLJqjwh vhK6UBmI78vOJj006QfDMyoowaSpAIYFUrQuGp0Uz02hBGxN205TQqIg2qawZ/Bk l9qkXqMK2Enn5ozd0ydRLA== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 41b3myr588-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 30 Aug 2024 04:01:32 +0000 (GMT) Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 47U3j9dj034714; Fri, 30 Aug 2024 04:01:32 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2169.outbound.protection.outlook.com [104.47.58.169]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 4189swukv3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 30 Aug 2024 04:01:32 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=tUqFvfKmM/gnDTJAuhlDbJjNArRQnpLh3AOHUNVEysFDuywIVKqMLlKKc27/YPF/97f3Veg/hke1mj4EQU1djNNIwCCK8GOXDZpt1k30FQVfr110Rh9NcpYDo2ba9ov9Ce3ltkHFW3XuSzaE00JPsqa3Dtki4aMNBOcgsDavPojABpdWrGAdcp/Q1aeQ9KYEin57PS+ADA5qS3PVJTpLNsnUuoFFOlmZ7meNWJWKsQ1Du8w/xXHDpT+2kOeLE80BmWbd1WA5OUgFDjwaVSlLNm01tLygmb6tuZsR0l5+LHllWPyleegyDAMAoDN/BYIdUgkeYCGDVVFa8aq6I4AUxQ== 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=X3TVDEXy+8mIis7fJmNHmIG5dYhcUaHLYXCY/rRjgL4=; b=n3wIfYTx9X6pHM9wc3JPj064Rjd8K5ISNCmrtSI86NIlcOH8UuB8a/gDovlP5i5o70kSl7yQ+lbVBZd+IYt+TP0198cPJs+v4nsJgSkDXqN0cuFCsm6X9uGsNgTC0UMs9YCPaxZVKlD3ea5L4NOu5+FCcYvA5y5ywUUUINixrZSfPAm8iXMog1gdKlbBAw/WS7Cg9gPp5ZS4UIiag76jzwg4isnmNn6VWPvdECBD7UNn8oNZVXwjWtw1h8d2FYBfL4fBoCqGyun3NNQfpKf7wQLHr58x72+eRfw4aOgU2nbedG3rQLeWmE+j6kRBxgH3R0u5k7JNbr7bhLlklcsDsw== 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=X3TVDEXy+8mIis7fJmNHmIG5dYhcUaHLYXCY/rRjgL4=; b=SVdHwDT/3xNFUPu1eVmKU68O7YQdsp5ov7kj+dvtsFirIj+SjGdPtxjMbo+PNPAyBNG1oTABKHBMTTJ+DAuLcdokPWXl+fWz8tY07egBoWL9j5MdNkHnLHP1q2foGqVzYb3gGI4KHD2byY1lh+VyvsBJ3w+X6D3Z5kz+DyymkP4= Received: from DS0PR10MB7933.namprd10.prod.outlook.com (2603:10b6:8:1b8::15) by CYXPR10MB7949.namprd10.prod.outlook.com (2603:10b6:930:e3::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.20; Fri, 30 Aug 2024 04:01:29 +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.019; Fri, 30 Aug 2024 04:01:29 +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" , Jeff Xu , "Liam R. Howlett" Subject: [PATCH v8 10/21] mm/vma: Support vma == NULL in init_vma_munmap() Date: Fri, 30 Aug 2024 00:00:50 -0400 Message-ID: <20240830040101.822209-11-Liam.Howlett@oracle.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240830040101.822209-1-Liam.Howlett@oracle.com> References: <20240830040101.822209-1-Liam.Howlett@oracle.com> X-ClientProxiedBy: YT4P288CA0014.CANP288.PROD.OUTLOOK.COM (2603:10b6:b01:d4::17) To DS0PR10MB7933.namprd10.prod.outlook.com (2603:10b6:8:1b8::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR10MB7933:EE_|CYXPR10MB7949:EE_ X-MS-Office365-Filtering-Correlation-Id: 16142e4b-0027-430c-eb64-08dcc8a86d22 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|7416014|366016; X-Microsoft-Antispam-Message-Info: XjkQNhXW4d9SsIpeSndOAewtTj6N/ncaKr5X4R5PHNxc7Re0EX8A7pL123HBB2M3hEQMvNCv7Gy+E52HBOuXNf8O+ItgTKxGHr6jhta7e2xE1VD7FwI5yjvEcwaYuUxlyzlmcKTDI2vEg95+NpqyQZu0X2JeHXVVj49ecL/ee3XXOVgQytI9Y/OT6ZsvqdFFYhiWlO1cj4D+CxeyKQpTq7Jsb1EW5wBKF+ZQHpNEMwyMFuReQEUlqne5LQq8RPv3Mz2MbpG2eGKicC5qycnonKIsf8YEnnuPsJtZvdo8XCUswNCeSBYCrdUvGtzVM2dV5YrUgo4j/LtDbOBsqBdS5wc31sMsOxeIK84aGBnLngEOZti08AupKaLHPd9hjNoHl2ZCKb7SuPnUkFk/bgtr+stC3YCFfzPN7E4MHsW0iaRG365B5C1HnjG3wAo5CjSjq8Xj2PQ7Pjs1lJpwBhXy0TWEytH45DRicvkzs0wNWT+Hjb2omBZAITz9K6nkFTlvKDDrTCxlj5N4L+PMw+X3X08NIKwRq9ivl/9lslsKyTdPbMe+7dcbYf5HbsxdE6s9hTZvFYMMnau00cJuKfmZodquj26nQHN+lBzTFH3wxmj5mQoDbpZdnFwQbvbj/47krJU6UtgeoGMWMYtutT3QcMiA/Kj5l4BkjcP6qo424cqPwn6Zr7DZh9vZtMvYHsc3yAfn0CLWmSCzndhxIw0ndexhmLUufiKqfw+cKoX4Ta8/XBBUuTaLz3MpQMPC7jNCuBSTS8o7X50fWUIQGjIXhwEC17gJlrd2o/0kghF7RJKrwHteLAfJgw4jBoYWGIgl4GgBVtdgeD3igYqPZpDcRZti1J5gKMqH8rcrCU6ledZcOWhvxAsd2PsZGbbWJrv+N0GqFWCFSV+lVNawlO+wol1bb0pYqLWy3CiXnae2MRihqSE2tVkTnIfT29mU8ebEImXjrCKOIHKOocjQ7XXX00BATajdHZMQun4AZNtXUzMY94doSwxRWSCxRLQXnUUAghxRF+UvJS11iqjAi5sPfn++LM6PV9fiYcs6nMm65whFu1/eceMnuS3xnObiSO8xLzrrNptA144kjBzhFtjF3dHMAGy+TxSdX0W69h2o0XT2p1hFUcLySRtNZjbqcedxG2u8dJIsi62oBsNP69i1hOLxroI6ETY8wanlvSEa893ZBsdl6tgk5RTy6++oYzXt1uY76qJ/QTgD/o8PzCKrzITfXqDPTmE+Rbo660hg/K7g66mrWD6FFjlb3zqPQmWHLUxFgm99uzt6u+ef3xmKSbWop2TlnWpr1J1ecd6rm9dUSDyc7fd4YKDFOLpMIM98g/qMFhsFhjSmV9pfQhHZnA== 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)(376014)(7416014)(366016);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: YQ4aTX8cEv+kiBxqQUwXVmvhQAXbTBcpnXh+UnZH1IFOLDQQmewCuqOE888I+DaLP8JLaYNbX/hebj3OhdDbsLYg0Fpxvjrt58YUt18r4g6jzf9pRuwSxvC9kKwDrBBJOc1PG2KTam0MK0KIGVyfMZK5rwVrwBZuOpszmPAeO2uIIuTT9odN3D262+o94aPxYsufz5JusDCriptc5i9/rWgteGTLQffSJ76W03ykmj6dPJ9gs89X0lRnS28IXunTWjjLa/rg92Qf+uf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4sSIZnCJaAhitl7o/av8DXg3n506tdBXtkqdznl9TYZPMyO0BIS88FeM+9YIBiFw/Q1AyTTR4VLIkFKDQnMfuqQfeV1+2GSjkqtew/j2viYR+G1A9Vv+lgFaqoOGST+RdzW1JXhYlq7p4hvUQorOOdgQibEjqSdOwWlouiWvTcWm48buV1ClfFLMpVvp8O8+4B/y0FfyEoSJw3KMUVHUBVXkdP41f4xl4cjH1X4Pm8Kfljq+yC0smOvZH5lYNcgOvuZwbMQMQ== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: 3zscJbNDGyELvyMSql93u8Fdkm7aRJTvxnZx/C+qAw3MJPRZfa36Jh82g/g6ylawgU4QXasNc94Y7/BICyx++R07K+cnPZyCgHHvdS0132We1ZuX89G0ezLSLegmpbrG9tYiLRhvTP9byjT3erqnuQLZ2tqYYGuWBaG0gZVpRTFHqW7vq7gBCMQURbv/3yLXhSicOp5Zn3F8YA0B/TRNqbxQMofeiMnwBgqVI4IYvVjZtTh5vrNnhzMTEZN4b9n1DhcRZ9JoLGiWmsRzLvalXpFgNa7yE6d+yWjJzcU36u96C3q4+5jZ7lfBJMhcmg0OMOZVCK6SKdcpuikUnQusgOmkLoJX54LeQPmF4Ttf+JpV1Zc6oSdF/B6A/bO4Mam7lFvUsykqm9+IucV8czrXT982QHuOZRP5LzT+FSkpx/VvXkkVqguKlHkltb5t1mr53P0MWBuEk+cN1hX8S328vI3GyTDF+s8r0O2uxqX/EAB1C6wqBXtPA22nAc9FuQkxbQekjcQcA7wfAjAelgOvjI3vGTsxV8c8TGMgOagtgK9ExLxwyAkQ88Ndfhs6qL98L60eziepezTxjK4+W1SaEK5HKCd4h8hzGcKg02BjmUM= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 16142e4b-0027-430c-eb64-08dcc8a86d22 X-MS-Exchange-CrossTenant-AuthSource: DS0PR10MB7933.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2024 04:01:29.1861 (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: iVwcVMbY2p0ouECm7pX3hxAZJ0CqWee4qHSJY9Ljs2tn0wL6M0KEuH/8Lr/MWVVKYEf2b7owbWf+jorLuIt3MA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYXPR10MB7949 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-30_02,2024-08-29_02,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 spamscore=0 suspectscore=0 mlxlogscore=999 malwarescore=0 bulkscore=0 phishscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2407110000 definitions=main-2408300028 X-Proofpoint-GUID: eOhw1X3WPtRStrFG46zQ7AKI6eVAj2tH X-Proofpoint-ORIG-GUID: eOhw1X3WPtRStrFG46zQ7AKI6eVAj2tH X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 18DBF1C0012 X-Stat-Signature: y7x8zeq5tozm7357wptnetsogogcfgbg X-Rspam-User: X-HE-Tag: 1724991813-346787 X-HE-Meta: U2FsdGVkX19c8s4KBIGjXlKbUk3weDihf36r0UD4Nb7MWIisclkp9NeXWKuoZgxckBiRxua6fh6hdypo4gjILTqtw1xZLIaVyWykRFKlnbbJSK5SLSaUfWFz6neUTird7yPnTAE0q8QCrndnT119zMABWBxXc4bqrqhnkmOFVadSTzDkmUEisw912ivMeEotxR2aWXQ/w/hTc82vxbcahnsOkSLL6fOnpDOZ3sWZ+Bg1mpp7yGmav2/y8EZm605Nl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X/oNtFfD02ETxDFQzvMt9uBJugaGk6RpCjBTep2K0Al6o5G5FTpk9q1XBQ0iX7Sf8u2jmauIrTERhxKPnMGtLMsHYdR/sXJpVF3txf9Xv3KboDetSkDhtHy3VtB4fNdjG5aWqnvs5hBH0Be+qxGj2O2i+NLuOuLYURnaja+nc4kCJtsRi2DuFu+IToOsG72Q5EEScj9E0USbOzgpmLI4j/I+5+PkPW9nkh1fGIGhmE6uRhSJQiFq85xkzG1SoHsGGiXqrkyLtE9eXRWk 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" Adding support for a NULL vma means the init_vma_munmap() can be initialized for a less error-prone process when calling vms_complete_munmap_vmas() later on. Signed-off-by: Liam R. Howlett Reviewed-by: Lorenzo Stoakes --- mm/mmap.c | 2 +- mm/vma.h | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/mm/mmap.c b/mm/mmap.c index 84cb4b1df4a2..ac348ae933ba 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -1393,11 +1393,11 @@ unsigned long mmap_region(struct file *file, unsigned long addr, /* Find the first overlapping VMA */ vma = vma_find(&vmi, end); + init_vma_munmap(&vms, &vmi, vma, addr, end, uf, /* unlock = */ false); if (vma) { mt_init_flags(&mt_detach, vmi.mas.tree->ma_flags & MT_FLAGS_LOCK_MASK); mt_on_stack(mt_detach); mas_init(&mas_detach, &mt_detach, /* addr = */ 0); - init_vma_munmap(&vms, &vmi, vma, addr, end, uf, /* unlock = */ false); /* Prepare to unmap any existing mapping in the area */ error = vms_gather_munmap_vmas(&vms, &mas_detach); if (error) diff --git a/mm/vma.h b/mm/vma.h index e78b24d1cf83..0e214bbf443e 100644 --- a/mm/vma.h +++ b/mm/vma.h @@ -95,9 +95,14 @@ static inline void init_vma_munmap(struct vma_munmap_struct *vms, { vms->vmi = vmi; vms->vma = vma; - vms->mm = vma->vm_mm; - vms->start = start; - vms->end = end; + if (vma) { + vms->mm = vma->vm_mm; + vms->start = start; + vms->end = end; + } else { + vms->mm = NULL; + vms->start = vms->end = 0; + } vms->unlock = unlock; vms->uf = uf; vms->vma_count = 0;