From patchwork Fri Aug 30 04:00:41 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: 13784181 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 30454CA0EDB for ; Fri, 30 Aug 2024 04:01:26 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 59A436B0085; Fri, 30 Aug 2024 00:01:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 522AD6B0088; Fri, 30 Aug 2024 00:01:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 374EA6B0089; Fri, 30 Aug 2024 00:01:25 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 14BF36B0085 for ; Fri, 30 Aug 2024 00:01:25 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id BBEB141414 for ; Fri, 30 Aug 2024 04:01:24 +0000 (UTC) X-FDA: 82507562088.24.12698D8 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf13.hostedemail.com (Postfix) with ESMTP id 838A320019 for ; Fri, 30 Aug 2024 04:01:21 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=SzoZ56Te; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=doMnEIvS; arc=pass ("microsoft.com:s=arcselector10001:i=1"); dmarc=pass (policy=reject) header.from=oracle.com; spf=pass (imf13.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1724990408; a=rsa-sha256; cv=pass; b=vouVOI8Py2neZiGpCFsRb0FIezwGG8tbqhjYtOXyBlpJvYev7TiTb7sgPR+wvCNbSvyoqy NPsu97WiV4ML9AsFHxjsZ92YXOM3Qrfhu9XW1rEO7jgGuDvEwbDK64qIAhOV6db5x3Mwv8 NrHnBBRjHV6blXlVtdw9AyxFd5YYs4k= ARC-Authentication-Results: i=2; imf13.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=SzoZ56Te; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=doMnEIvS; arc=pass ("microsoft.com:s=arcselector10001:i=1"); dmarc=pass (policy=reject) header.from=oracle.com; spf=pass (imf13.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.177.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=1724990408; 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=+SgEZNii7vamI+Wr52WRA094htKGd868kPJiAHCbwa0=; b=xnnEJ2/bs3ZZce2Wvukf+vvIt3CjvelmbfYrktlw+QO6p/BkXt6+uB9t+i9CmUPK8vYfuz CbGDY8LoYmGmPn/Ss9NKOy1SNxHFg5jJ8fEMQrS1i8kTvo7FVL6sVPh/mm/8y83EbQVXcK KPjbei/iWgQfhea2j55IQkp4MVCY46c= Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 47U2fnwk000993; Fri, 30 Aug 2024 04:01:11 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=+SgEZNii7vamI+Wr52WRA094htKGd868kPJiAHCbwa0=; b= SzoZ56TeDcjmyiefwjGSMryqu7MQErLbMdsOW8GzGZwOX4bDtMNhxqyyUtGFZBQ6 C8Lg1HHOuhEbesQMRsKSOAUTwrz067Rjgtj3q8rOZz51lO2T77WAJh72QP9hy4nV zHvLr5OQheNlfNspNi3ueDgxkkgQDD0ibd+1dCjOZQHVeVrpHsOo6IPSwE4FNmv6 o7wdVvvXmholE5B0WJiyfnYMf+kK3SOVSDS24BGkC0wYTd187KtD610QBfY7CazK YmKw+FMdVZEUZ5fOd5vMZ9zzkLgg/WkdiLtgXzSUromS1Q9u39fm7ntBiPRIJ1tW B66iuhZdTX5aI0dn7zlwJw== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 41ax0grrgv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 30 Aug 2024 04:01:10 +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 47U2Cu6V034855; Fri, 30 Aug 2024 04:01:09 GMT Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2176.outbound.protection.outlook.com [104.47.56.176]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 4189swukex-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 30 Aug 2024 04:01:09 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=wXhVpMwjWbONTYNn6T3Mau0KxOUK2fXthg4FHwxbDK9AH5GKfy4RC1JzSDHhmiGiLpXZUG5q3xHGNVkTxjjSGglvIDE584SHCdTvlZOduh7wIC25P44yE+z8vtuTxLypDrblDlmDATfgT+F/MkXsd1rXqO7Z7V4wE6YxNky3RolUc7JhpoF0phzcqzoANlwAjpR+PGXzhkNEQZhJdFTQp/9KHtiL/9MD/ksXBgVfHcnrT0i2PhvqbpBAWXzuRRS8a5Z4El3apXjoWWv5Atd5Jkkli5mSLxDNu3jPhIN8FreEjcG0CI1O8DJGn7vehSRu0oTnv7t8xzrGmuHYS4qBMw== 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=+SgEZNii7vamI+Wr52WRA094htKGd868kPJiAHCbwa0=; b=CuS9pIJDhGy3ddwvsPR1KPxdGhsUjYkMZ7kFWctJDhp6V70nT0IhhauLkW2Mu4AE45M/UE+lzu73nNZom2fvs+vTQ2BTSFch5vOjtPSXQf00HDo16eNgKLD87cixL18QnWizUbmFVEr3A61snDiZklOVWoAANweLsetat5ZJ5EfpRH/Y9/wZxX2WTqrAxYlczA7FbJnhNgXFacgj4RqUaSDmW+ux395AZY384mAx9czHyBweq7mtzxr6BtgPeYHk8aVvAYB5PEoqqzWN9grKhUtpH/Ehs2/TiM46DlGBrNaN9+AdI4pOmWrKLNPcUa+zYu4wXMSYu9SA5pAuSaQACg== 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=+SgEZNii7vamI+Wr52WRA094htKGd868kPJiAHCbwa0=; b=doMnEIvSHBC3dkgZa1CTq7gC2Etx6A2SKNHDGCyDIer7hyLaCd8aKX8ipNZ0PGTW1SvLACnZCDm1QMt/6aT7Y2t9up6olBQcAUADyf3u2ixmWgQwWA3LAyoqpSMafM8rt+2HlJt+GDAXkS+8k/rPEBZ6THP2ZaUqgk1El3P623E= 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:07 +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:07 +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" , Lorenzo Stoakes Subject: [PATCH v8 01/21] mm/vma: Correctly position vma_iterator in __split_vma() Date: Fri, 30 Aug 2024 00:00:41 -0400 Message-ID: <20240830040101.822209-2-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: YT4PR01CA0427.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:10b::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_|CYXPR10MB7949:EE_ X-MS-Office365-Filtering-Correlation-Id: 4599cd62-f987-48aa-1bbb-08dcc8a86068 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: cdi1d+3b2GiFa+Aki9HeSVO4uJSmuhVIduatZgXJ+ed74BQeOkLwPS4guWaQS1vR412SAIDz7YAz/lZKHmHKIwHc24yG2bEd357pDe1IFb4JuCpWk6OCIXHb7sG/YOlAsOiQipXbJB0q5ga0an0YanQSpOx/paqoE0grDGQr+I+XPQceMjZZkSTICLf7TDQxg/hYGSA8f3tmKpYBpxt2XWJja4Uy0zBj+CUqkUyKXernSoI9GwkF13UVy87mODr1g5rAhE1Y235mAGqOzKZ/4DGjm2daoDQu/+jGW31kSxR985lJGOU7m99huiOX/GW0WnDA+MsLlMYkdLd+LqJRn6ePi0HUIs9LK17A0IddIQgxcR+pPZO4TLWjccnINIRYpABmquPWDWdWHwDjfzDOqdTJsXlPXF5/3EBvL7WEmo7C2TTVaTfk6OUMq3SP2Kd9G/B4xIC4wVaj92uO48CPJVwD3eVLNILL1t/O3JdxHP2oiAXkuZPHlWyYeHbrZLYLLQqDnIIdacazevW8Zu7D8CeSjxxRMRhoSJjgctXY/jww9eIfRCE3ryep36fgf8P+yjO2LUS7xF4C7O84YKm+/+sX+aW7YmEjIiPWNc85qFow+g+c6+irt20rYkAKSAZQLQa7PEbUOb4o97AdXrbQhLAGHJ1ii2l0S00vjSQzfLTuuYYjesYhk8dzpj4FG1ueo+3WjbOhlqEVYTWWDWMuvBno+S+hoJ9A/J+llB5ANJRQnDCr5/5lASIf9k+DkbJ9qFGA9ontHZFIHyiPmACj6g6YwkXjqAvcxxjT3KfkrK+5ZyEsutdQikLTjQ8Rro16ekaTrUFSN+VpEcAHpcBwebaGKIPrMT1W5OuAj8g/NEg7eC68Fv+gTspaqR5p1Vmewfqi3LFjUGhsnGXYhfWkscKmFMu2KQTIbnJXUvPTc+F1m5IyXBWl/ahKggZk/fVLUJYDk+FzksqrmRRvRwrnYQ8uLKvI46Hp92P+RCJwWXNQeQz0ves3m4JbjFgEsEkL/NME2c0PE9D+UX/eMHhgtVjOR7FHnwf+ws3EEUAvYW3xjnB+qp9r7h2uF1P2/OiRNzM3DH6N3sy1DaNxYQE2UbmhZqe2KCQsXJK/SnyfQ6vhkXdsTSi4w5WlgHcueHqc7fD3xA6zn6rGHQmrsPX266R6MQQzxXMBarRsPUadvXhakFjFfSKoZ/aKn+2aN1GIYe5PVPBoGgJ5WcywGhT/tPt19Sy2n6DLFA0qqo0jXRXO8kqsPtuo4neiYuGilszUTmCHwEzDhXHAPLfgV5VOBIhgKlpGZ3ThAWIekrcftkJCR2AyhwmMnuC/jDIMAZOGT/Wv+mofeXKJI0do3hiwCg== 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: Z4q4is07N4vxl+rj/O5sIbPPGcuI6Yvk2wjrfV5CQO6wCw8j9ENEswoLrgkfIbThVbKnVBMOg9NpTCCL2yEOaaMxcmw6mMdg7y1CrfLiYw2hkScqFgLCj0Oqf4alvbo90q8TS8u/oV1skZjLJti+TZ+HGVJyF0hjmndX0KKmlgYVWIJyMcSRTEAj3zK5n52e1bUndrLd2D15Eowk9fb3x/zT0JUrvLUmnFr4USLxHpO3GhrXv0t0PxYSqFYdMQGZFM9Kd8MoXbW5iENCk3s4i/gvkz7fH4KyhU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GOb9eI0U4fWCW+OzMcIkDhCHvfKIV4qF1uUKbIqsvaItGW+IvrNNdlZ2arKoKrhVSSySahvmydQQnZzOJsU84KdQ8cJ2xG3VccG0C82R5SnJYYTs3S3Zz+8opslK4UnLMAMJkh580vlcqx7jF/yzihjvfB98pdGzmQh0NzV3LHdVM7am1mzfjqQUr9u4sLHa2h62oKtHVlzlmTbNBx6Guz X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: gR7uJof7Mk6dSMRPBvRJkABPXZULKGV0eSXf0Yd+LOniw9/sFOjtJQX9okDQyTtjHfK8eD6UUnhH4irHg31M3zvExs9+DWz3nTceghRxhM2AorYmmoJGBM4ARScmheT+1MG3PXawuHjNqEPK5eDycgPNch7H0tubUMtILhpGQwZYVInbkw2dRxpCeKaHQmeYRw57lWno/qNsnzQUkm/FNjw5wk7Vus/rXaP9t8gBZI8dmBM956m/PjUKAyZdNHPCMS1Q2lOUDTY+AGvD3YKIwHaRI2h8CVX4SJtXWhUJk7ddyANF9zG4TuSkNUFhMkUi+q7o8GUzbehT99Ag6P5LO0qm/B8zdhm0/qgHpG5cKMAA3BLH0oqJYl9xFR+kLiC+b9fVvcOMGKp5RPH12LiJm1RggAjLhbdUWLwrl/khyBU1dL0nGNm+89T3GQLuU/S5UDhE7D2YqWKv5Zfc8VGuEKCFBHCMGunaTgSHRdXRD5GfFD2JZga+Uj8gcXMMRFAm2hp3no/0BWD5sN1O3cG0335bNAUKSQyjGlhlcI9u0OzlyZM5QU79OTnrVH7oSMlQzi6WogLssGCJoDditDTkGH9BKQ/FLgY+XIvaJbUhk8I= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4599cd62-f987-48aa-1bbb-08dcc8a86068 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:07.8549 (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: z1dUxOCqWeCZHSUwaV/lazS62WN6f1kfK6QFwEZuoxKShqxuyKjDu8vl1ho5OhtYYrkPjSfocLxgx7ZtTE/O/g== 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: 10gfR9VdhwdVEU9Jc4MIXMsiPYNdQyJY X-Proofpoint-ORIG-GUID: 10gfR9VdhwdVEU9Jc4MIXMsiPYNdQyJY X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 838A320019 X-Stat-Signature: tr3yzpg5wbx4kt76dziizi4bp8ewdcg7 X-Rspam-User: X-HE-Tag: 1724990481-340583 X-HE-Meta: U2FsdGVkX19cjwPwfzqpD9zWky/HQ68rOODcbrX697kodCW8tct1wb32VxEYlZSCzG8ewuJZ33hUiG9+C+QCDr0EUkDo9rKQThsIpve0YOX1/nqj+ik9Wb+00AXnmxIxm4F5eN79NDaKtJeR5jFV/xbG74/dnKu8JAItgtsPsmzz64ywWoijkDMTQeCDczfFsPVDfbY3iPeVwnhemJqh72XZFCMlBn88ToXiq/Ld8Tc0eAT4ZpwSmK5tueFFk6/0aGfhBHKK7R/n4yNiwosRv6hAdQPPlSu1dw5EfoGfuO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PCWu+B/RgICcVITG+708BMl0VF+2rsi1FNn+UXXeN8KVNTu8RhJZ8nE+wxia4UmwJ/VF5WJV5IVqgIG+SEGpEGLEXPLCPLNBjI7PIzWLoO1U+UCnNXbOG4klKoCuqF1qk5o3EBCZ/28+7WCcmlCmOw+A7jF/q+KZ07Pn4pgj4OABROZqqaFbbfWvdltVVwZUIwBkoMWrfYPF+MgqvjaPFLLHCuGPx1c= 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" The vma iterator may be left pointing to the newly created vma. This happens when inserting the new vma at the end of the old vma (!new_below). The incorrect position in the vma iterator is not exposed currently since the vma iterator is repositioned in the munmap path and is not reused in any of the other paths. This has limited impact in the current code, but is required for future changes. Fixes: b2b3b886738f ("mm: don't use __vma_adjust() in __split_vma()") Signed-off-by: Liam R. Howlett Reviewed-by: Suren Baghdasaryan Reviewed-by: Lorenzo Stoakes --- mm/vma.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mm/vma.c b/mm/vma.c index 5850f7c0949b..066de79b7b73 100644 --- a/mm/vma.c +++ b/mm/vma.c @@ -177,7 +177,7 @@ void unmap_region(struct mm_struct *mm, struct ma_state *mas, /* * __split_vma() bypasses sysctl_max_map_count checking. We use this where it * has already been checked or doesn't make sense to fail. - * VMA Iterator will point to the end VMA. + * VMA Iterator will point to the original VMA. */ static int __split_vma(struct vma_iterator *vmi, struct vm_area_struct *vma, unsigned long addr, int new_below) @@ -246,6 +246,9 @@ static int __split_vma(struct vma_iterator *vmi, struct vm_area_struct *vma, /* Success. */ if (new_below) vma_next(vmi); + else + vma_prev(vmi); + return 0; out_free_mpol: