From patchwork Thu Aug 22 19:25:32 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: 13774119 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 482F0C52D7C for ; Thu, 22 Aug 2024 19:27:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 95AA480055; Thu, 22 Aug 2024 15:26:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8FD238004F; Thu, 22 Aug 2024 15:26:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6DA3780055; Thu, 22 Aug 2024 15:26:56 -0400 (EDT) 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 4B4618004F for ; Thu, 22 Aug 2024 15:26:56 -0400 (EDT) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id EE72B1607EA for ; Thu, 22 Aug 2024 19:26:55 +0000 (UTC) X-FDA: 82480863990.26.9BAEE46 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf21.hostedemail.com (Postfix) with ESMTP id 983BB1C001E for ; Thu, 22 Aug 2024 19:26:52 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=VYg7RxJM; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=bGwzU7jx; dmarc=pass (policy=reject) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector10001:i=1"); spf=pass (imf21.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=1724354752; a=rsa-sha256; cv=pass; b=zV2csgQR1bD0jEMLF8GddpK5u7E+WgkgSezZY2mphxaJgNWZdBrc+TKrwv6StvOK2QdpBE 4NwedNmaMW+j1cqGoN1m0WqxxKDtb5OWoudHvuCU0uYdULkkr67BrLY8v7UOIO8izFMdgV /ZerBQPX4EkvLv8jUHI8cLJ9fi87H0I= ARC-Authentication-Results: i=2; imf21.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=VYg7RxJM; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=bGwzU7jx; dmarc=pass (policy=reject) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector10001:i=1"); spf=pass (imf21.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=1724354752; 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=RKhc07Fbuk3qCe2lrKepHFoKO/JwtwJK4RHQzIAhFhY=; b=WPInljHUr4lOTpCqXogGMSAPLNXWfqhzutOFlO92yT3fg/eu08P2mrz9zYa4/H7ubJkMXP jE01bpRkW2ifiHPj1W+YZbVtrQs7oLcqABcdT9N8nF1SDVh9CXXIeIP4SjWpXdyEIX/emm 2YrrWmEV6vf7sRE8L5J0CO2TAaEAnYI= Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 47MIMXAO029758; Thu, 22 Aug 2024 19:26:37 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=RKhc07Fbuk3qCe2lrKepHFoKO/JwtwJK4RHQzIAhFhY=; b= VYg7RxJMXC58fPuV0nhFlldKDexpm5j2kPsUsWFjV4Tcj+OAsmPESQ3VI1NfTuRQ ctvac4oYpHu3zfcajW+pkrEeNKb+nO6LfVbkue+80C5BipqWP3cHglflOinfCej0 WVu9EISCns067H/YOxkIoGOtwpoOeTjn3R0R92iouVxwTryTpMA0BjZ2YowRbkDQ +idOCEbYeyOuk9daf5hdwA+mK5GbHxUH8rocBvp+u7D/dJdXI0j9XJilEPxXc3bY jr2Qs+t/Tj2AVt+qxqji64ER9Ga0FlIGy1F4W9+qbZqO2chD5FdSAJoCUIgrs6qj 2kvKIzCgH3APs4NW5Nyyuw== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 412m67jrrd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 22 Aug 2024 19:26:36 +0000 (GMT) Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 47MIqaPw019453; Thu, 22 Aug 2024 19:26:35 GMT Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2171.outbound.protection.outlook.com [104.47.57.171]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 416b0b9ckf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 22 Aug 2024 19:26:34 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=PfOQSiI//qph2J9YwbBlhiWCqFYxiLAouuDLEbFld316M/mYg6SdSg0O8PazuYW2ghsVLNRWbgRjRZF/oUzo69Gg8t9VETNhK/2LDV+7iDsQGINo10QcCbDlUV6JdPPVEjHxktXmd+Hb7Z/7z5NejJBHmqrbnUjDb7SgL4Dr8glzf/ertUnAgZql14VIlXfPyKoj6NgxSWdOV6jH2XscbkBxQGuUzwHHwottdmyS5vJjaq+HhpJlEhc0I8BD8NGEmUyArSbQBaLddmIW9Il3qYUWKun9k2aeQLUWwJqBzsbY+wsbcvLzoNJ+4eAXILugPFNGgVpzIgbDkUq/D5lYAQ== 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=RKhc07Fbuk3qCe2lrKepHFoKO/JwtwJK4RHQzIAhFhY=; b=dUWvmWDw3Ks3MoHt49csrzGOqSVWf42c3YRIcdHcWUknDSFyUu28prVnoMqvtZYv/679Qnxl9jsTJ9bjmvxYPNyEF64fU4TtoOU1TTuKCsJZY0k4eMHhDrYXyaVsrz2FpPHbEF+HKLXCge3BE4LnsKt1mH/h/iTPgrvVtVuziIQwxYpSZrV1sMfq39QOzm4D61ibwuI/bvrVWPaPqcW/0cD+cEsyM1/OtzIj8I0lTOesJGApuyJz5PcvIS1/Jj6pjKlOiVmUSwmQI2w+qgb2lPrJ3EKILleQtfbRb2G+B1eDP7eMQ6UcCa7bpzVxiv/IqlsG71mDsAtFeRq/v6WBJw== 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=RKhc07Fbuk3qCe2lrKepHFoKO/JwtwJK4RHQzIAhFhY=; b=bGwzU7jxn7735D+qhG4eDj89ka/22j9JfvjfBmpDvStZyd7BpbbXLLtoHt0dAfuR9DhAd2UFf8oZrrWO3K9iRjVyk8M6suQQjAqQ0ers5ArV/ynZYtS5ieM3tjWwkodeVYT9GVcbo8cyQbmu2bM8WqkzVn/1zLGShIJIikRnVq0= Received: from DS0PR10MB7933.namprd10.prod.outlook.com (2603:10b6:8:1b8::15) by CH3PR10MB7761.namprd10.prod.outlook.com (2603:10b6:610:1bc::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.16; Thu, 22 Aug 2024 19:26: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.7897.014; Thu, 22 Aug 2024 19:26: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" , "Liam R. Howlett" Subject: [PATCH v7 10/21] mm/vma: Support vma == NULL in init_vma_munmap() Date: Thu, 22 Aug 2024 15:25:32 -0400 Message-ID: <20240822192543.3359552-11-Liam.Howlett@oracle.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240822192543.3359552-1-Liam.Howlett@oracle.com> References: <20240822192543.3359552-1-Liam.Howlett@oracle.com> X-ClientProxiedBy: YT3PR01CA0037.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:82::14) To DS0PR10MB7933.namprd10.prod.outlook.com (2603:10b6:8:1b8::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR10MB7933:EE_|CH3PR10MB7761:EE_ X-MS-Office365-Filtering-Correlation-Id: c89b1153-a699-40c9-3512-08dcc2e05261 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|376014|366016|1800799024; X-Microsoft-Antispam-Message-Info: fDxvVSCYSgsRmEK0wd8IrowfhdGrp7zIpv316qvoWn0NYcDED0ZPKPqiDU038wp9ePTkbrAPRvnNEKGPwnE7c+dYeUYKOHDz7hyX8VoW6sS/gsJRKLu8DCNY9KlfwXUeluNDzGho5MMZe9b+Fa5iYXJMUCGgbEqwOQ5pHVxH+/LhjQoB7S6sN797e7Tx8GLRU5JacYxBJByVpLVVkcM4N86Nussdn6b8ic9ySLavBIYMlkWSUnjGioOwDJ/nX8M9SMJDZClYGQp1oxVNgyZQmJqRlQvq5sLtoNyAZ4kJURYI7NzXAjt2a9JpwW15JkV2uiIRZQuC3QOJlyH4M5SPNXkaRjGEd6jsScoeyNw3nGGCNTAs0cwCrOU+iMAXirPRRv69AxJDqXHRbuzrdMx5Hq0J4wFPJpUnYTkbYQXDBIb2p0yBjVPI6bUhmszBj9NJ66pZhGXO52R351hC//eOjZH4dXlW89KfdUXGAnXJa1llM+Eeown2o+UXBEqG4pDMM5P2NjB2mp/nUpk35UY7EIZRsRcJPasJBKE9uxEELurnS4AAGcQZc97aAqusq5/go9HrrxsdbdyCkVT9NU0HEiBVxyoDGeN62fhNWByW9v0x/EDsuAT9AMM70pg2seVr1ppgBYVg9H9cUnUOE0HCvTPWcVB4Zpqo/5hW0m0nREOd/vTFqyLOW1NGk8UJ5edIv0X3yO11elj2DK701D4aNlmwhWk/U8zaWeaZ/Dp0nOsLkiBd6BiG+rapIve2t8G5pBeiPBDtkrmU2JgFI92zlDnLMA2HiYhALS7qy3sU4Qa+6djoxuopPddfna2QbG781Qb8/Ly3BWRxQLYr1hNm0DQPyEYId5c+SxR+sY+jcUEMnRWvFJQYvFYAkFsHJfm8DEXnsAL23Rb1f9z1bTQMAbUOqokL64i/zNVU608HJZZz0ILsB3GIAtWdgyeRs+BnSeMCH5QnWgJ97zZKmqrYDFAzbuz3AgY1KWGC/E3mjcsfisaNcD1N1LanGNM0hLLdxkEsFt3ktoRg5sgF1fQzIvByi41DmOkO3qTqvOfMBISWhvc4P7+vinsGAtcu2hQ+WLpjnbW8cRi3KiEBUCDruc6FVg8IpXk/gxCOaM7oLqPiNh4jUqM47rW/k9rTgYsLly0MdC1ccNQxP8ipoIT9viHdBRo29phnFBEvUOWK3rEhn3BM78la5GPruFBjyIc1Sqb6NQuNyK3GFDoL5wnqtTK/9N6xh1U0MI+khTM42obGHva0FFxh2W9kRmtRIeU4HOrEHyAA/wLRFwjeL/2yPN6W46XlQVakEaIsafbUmBsUuuSxmo1Pb44Fw3eMkGwNfDsYhd8pElIFStMbtG/TVA== 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)(366016)(1800799024);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Rt+XRtI6eoj/EYuZDINfdIpnuPBQClN0vQZMU6Q8Ra/7UlLj7o1pp5mJe50Ot/fSCUBGriVBkwhwchOQK7VzWgkvXsifdwKHqeDSuNL4gbKNFeoltc4ZGDtBJp66TJh//TOdfB3plBoESuFk5FHZpVdmDwn720Tw3aYH/OvHWORecfimW4wiaTmpDAF46J7qWjBfrWqxdMc8CH3P138ZyGsqPpmAEjJz3QffdwlgguworTBPs8THOBeVstswh47suASSxF5hb2KF1ouXGqScqaZzga946bcMB+vv2PHLLRIZ0J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OTbi++IBdF9YmKR6YCzj5umDE6ozpc3NPnYKTMShp9zUhlHOFpSeghaH0smtKbrl3kayPkmtQh179cWxvJXDAfdKjJuwXQGiZI5Cuy7RLo9akqs3L4mGeCWmbvArK3bS/bmMJrWYFtrEdH7poyLwTduk//EIy5NyLwQpxDnIl6BnGRbI85eUfr2rWJ+a+Dw4ANpgqETkWGSdUu2l+sSIH1wFtKK7y77XjA== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: bW/wMVG7JkO6k785Rg04yBnEyOhlYRru7+L8AWLIZfUL2PL8GCx2EPptwfhq1pF3X1Jf8AW+ScaAWgH2yrqi8uwFbTwhsV8yoB70KS4XyDt6EUoheqBN1kXzBAJoIeCdCr4L9nh+1h3lUoPimIb8O3OQf4F4iogKIDjpRscvOjAxjGODzzMNU/6GmW+prwQxp9TRv3oryi1hTat6z1/3neU2e3GPwXy/H3I1otNVYZAssGohofndfjqVTIbHulLLlmu2Rtts/HTM0aT1gT2asLTpbmy6LhurBHZT+74nL2hhWgn0UOvdoRrnIFCYSSpdXJNOp9j8PHzz1EwbyV4c0rKX/RLS0r57Hcxo957jhJNPqllNLUjbDC3it8M4Vkn3vaCEDeYLHT0OaNBxs5syhwnD0rRKN2p2m3iU0v9P7jFuJq1NqqXGtM5s6XBeTsDjwT0gUYjSdM1sXq8lY9IlJiaFkhAbY9atNoMT1p0IxKLT55+erI0OvX9Oq5fG3SFnGfX96OMVpoQaee7P60Gw293FdfGdqsAlLxF37Mi2U+ifbn+RU6scaJZ+8LS24uYF2X+pO9jAgMFYPlo7iagof+j9Wwc5K1Vdy0BznBs1AQg= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: c89b1153-a699-40c9-3512-08dcc2e05261 X-MS-Exchange-CrossTenant-AuthSource: DS0PR10MB7933.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Aug 2024 19:26:29.2401 (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: 6lt7MTMHA5MZC0rJ02GvpMnPVSL9V8M3fNJvP48Smz5uWh/G7LKFnMmOczX48RBS7Cl4tSu+LbbPxbzv0PYCig== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR10MB7761 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-22_12,2024-08-22_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 suspectscore=0 mlxlogscore=999 phishscore=0 mlxscore=0 bulkscore=0 spamscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2407110000 definitions=main-2408220146 X-Proofpoint-ORIG-GUID: ksJX0AYixcUgqwMp0-Iif4tsc88hSg4Q X-Proofpoint-GUID: ksJX0AYixcUgqwMp0-Iif4tsc88hSg4Q X-Rspamd-Queue-Id: 983BB1C001E X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: xh3ueymmqafprfcanb9ejs9f3pfp3qw7 X-HE-Tag: 1724354812-844666 X-HE-Meta: U2FsdGVkX19HO7x/ZlysBm0NCrURF8mBg7DtV9k7yljjBx7055yxIfRLq/ZU2CtHrWoa0ZfnKZYEP7AfVcF3olM1ZWqMaAoV1wD/gu94ENyCTPC4wdq/FieVNY9+bSyUH5dgONPfDviBdZOdN+YhIyir99dhAuAUBUCR1NDweI9jbPm09wT3QO6/4RUCDusPHH0aeoe93ikZEHMnluipDftEP0znzFTfOSQ/rJ9/wRP7p0+WsgpjOOTdFkdrCUPjQb/SOgK4bPeZFhKbUVuxg/ibWwuLah9yf2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nwNQhCX5aVTkmYwZvb9ytWAWCOgFkOiFC3qvCjIIi/tS8x0DxV7L6EbGUWM8sjcSRBNRn8+TI1n2SQSu5zMWhGNh1RcQI2DWcGJU7zcEtbD8RYIjQjfLS+1U 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 e7e6bf09b558..2b7445a002dc 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 */ if (vms_gather_munmap_vmas(&vms, &mas_detach)) return -ENOMEM; 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;