From patchwork Fri May 31 16:32:13 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: 13681902 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 36812C25B75 for ; Fri, 31 May 2024 16:33:23 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A54516B0099; Fri, 31 May 2024 12:33:22 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A03386B009A; Fri, 31 May 2024 12:33:22 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 831686B009B; Fri, 31 May 2024 12:33:22 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 634106B0099 for ; Fri, 31 May 2024 12:33:22 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id B8BA2141616 for ; Fri, 31 May 2024 16:33:21 +0000 (UTC) X-FDA: 82179236202.09.74CF788 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf16.hostedemail.com (Postfix) with ESMTP id 461B118001C for ; Fri, 31 May 2024 16:33:18 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=FnM3ReBk; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=HCpTmrnv; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=quarantine) header.from=oracle.com; spf=pass (imf16.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=1717173198; 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=caSvmY9bE41fDaqsXdYRpUUnMr9miPHUopMtUxgxinc=; b=A+2kxxTaGefNffWRE0vGdHDwJf7HhPRFY0t/xHlSMH2D6LQQaNME/5eUlti5+h0oR+DpBN vIm0kacazR1n53oMJoY3E1wNDIjMAoFtoTLoe6xH+4ooXVWR8MaUZ8ifjFFICTlFiTxH/a 2mteMs9yV4l+NsEov7LziOwdW7+JSj4= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1717173198; a=rsa-sha256; cv=pass; b=dVIu7tgOBWvrYOxr0VBoA9K3lCq5EnQ+1WPT5IeBjHSCfeL97ris8dRcjEwvapAk8DlvV2 RTndBh8nGP/FVHBkCp8J1yc7qW8AyDgWbGI1n6j70mucPdv6yV6nVNWiwcL3mfn5cwVybp +3sQg3/99xcIDmucask90y58eXrHAlk= ARC-Authentication-Results: i=2; imf16.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=FnM3ReBk; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=HCpTmrnv; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=quarantine) header.from=oracle.com; spf=pass (imf16.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 44V9VWXO030176; Fri, 31 May 2024 16:33:13 GMT DKIM-Signature: =?utf-8?q?v=3D1=3B_a=3Drsa-sha256=3B_c=3Drelaxed/relaxed=3B_?= =?utf-8?q?d=3Doracle=2Ecom=3B_h=3Dcc=3Acontent-transfer-encoding=3Acontent-?= =?utf-8?q?type=3Adate=3Afrom=3Ain-reply-to=3Amessage-id=3Amime-version=3Are?= =?utf-8?q?ferences=3Asubject=3Ato=3B_s=3Dcorp-2023-11-20=3B_bh=3DcaSvmY9bE4?= =?utf-8?q?1fDaqsXdYRpUUnMr9miPHUopMtUxgxinc=3D=3B_b=3DFnM3ReBkjxbV4ag6Y0Us3?= =?utf-8?q?qM+Vk84i4wDB6FawhfdCk8CD5WgXOCsJRIYDjE92FxhHnDu_DB4kNnL79LOdd9EHT?= =?utf-8?q?n6CVp+LLQtHlCc9fmi4IqLwgpk5VLR9EzgczJ9iKYIQjme0JX6L_DdCyDRBLwu24D?= =?utf-8?q?I1+8ObiIq1bTrTkpixq9AJNCAvNoc1VMuLykjPXbUxENHuwstdw5Adi_1Mik9VaRa?= =?utf-8?q?+kJAP2cbWoDx0ke1zmBEi6zXUTgPptc5ZmF5//i0TUgmzKlAUeIU/tIcHRW_YXQAO?= =?utf-8?q?hc47FtwcyxcW7QWHK0OF5NPWKITnHxw6Kqk3/ODBQGKWPlaiI8stA3bbBa1Lx0Y_3?= =?utf-8?q?A=3D=3D_?= Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3yb8hgbk84-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 31 May 2024 16:33:13 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 44VFaLYI006199; Fri, 31 May 2024 16:33:12 GMT Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2168.outbound.protection.outlook.com [104.47.56.168]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3yd7c8kmkf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 31 May 2024 16:33:12 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XOUTz3IHJm2XCe9qsN3X3eAQEIJejHak0yuyacq56VX6IIWWb/bcAWgw968WAKoDU/ntKS228hbgHZQbJ18/IbdhJi1BArQ8cE6NOBZJVuoAaHfGboFBmwI6DL2TpDzj1UwVgByW7B3JpefD+REDMmofSFzRxj6BZtDLApNdAyk9w94q0I2fgwAxVmQzprEaQQ2Y3lJXsaYk0lGDd/dhuCODIbxXycBU64La/UbpoK/t7rgfQEYg4Yo3YPW/+hQlDsKPA6p4RQt1pS+z7L3RPVBZrGP7ed2tmdXeHdMe5TKyBXMVApZczR0QEBylUGb3ik9zsxpTxZ8mKsvWS4ea1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=caSvmY9bE41fDaqsXdYRpUUnMr9miPHUopMtUxgxinc=; b=IrLDRxXfj2RI1pgRK8RscYBcv47sbCIBWurPz4fWqTO6EEZkSlFfx6kPUZM0iqWIGBQ0TsqEkO9Uf9SQdfzYne2kgZr2cPpY1alwcHPut8csTTB/g2P5nd2BHLt87qIhQDM/FmOyZZEpTVq63zkWBFDCBMs+HqA4WNpQ2c3OhDaaQ6qtEtqEXvcERckFerrz+7POzsC7DC/YcEenWSQ5hoqrJIoyIgwTDysbqhsnM4Q6Xt8hIcckcf5u8Db2HVDYAkBOt9AzQF1jQFNUoTd+RxL/r5dbKFeEuRGXCsQFzYScQWLGT3VCuTEtwXYthS7m8uRButS6LDYwELgj/Fse8g== 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=caSvmY9bE41fDaqsXdYRpUUnMr9miPHUopMtUxgxinc=; b=HCpTmrnvDTM7rwYibiNdDIHlngkq8QdDzje4dAtHo8y5tgF5ESrF/78fD4ykYxnoqBF/nudrgYrl41RItO9YHPLqFbdn99eX2ipbAZCRDXk7CLDebPBUQKmJ7Gb1GohUSfIuwhDZi4Z7sjTzjNmyVO0xizRPxSxiEsEtW3kEonQ= Received: from DS0PR10MB7933.namprd10.prod.outlook.com (2603:10b6:8:1b8::15) by SA1PR10MB6318.namprd10.prod.outlook.com (2603:10b6:806:251::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.24; Fri, 31 May 2024 16:32:44 +0000 Received: from DS0PR10MB7933.namprd10.prod.outlook.com ([fe80::2561:85b0:ae8f:9490]) by DS0PR10MB7933.namprd10.prod.outlook.com ([fe80::2561:85b0:ae8f:9490%7]) with mapi id 15.20.7633.021; Fri, 31 May 2024 16:32:44 +0000 From: "Liam R. Howlett" To: Suren Baghdasaryan , Andrii Nakryiko Cc: Vlastimil Babka , sidhartha.kumar@oracle.com, Matthew Wilcox , Lorenzo Stoakes , "Liam R . Howlett" , linux-fsdevel@vger.kernel.org, bpf@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH 1/5] mm/mmap: Correctly position vma_iterator in __split_vma() Date: Fri, 31 May 2024 12:32:13 -0400 Message-ID: <20240531163217.1584450-2-Liam.Howlett@oracle.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240531163217.1584450-1-Liam.Howlett@oracle.com> References: <20240531163217.1584450-1-Liam.Howlett@oracle.com> X-ClientProxiedBy: YT2PR01CA0026.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:38::31) To DS0PR10MB7933.namprd10.prod.outlook.com (2603:10b6:8:1b8::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR10MB7933:EE_|SA1PR10MB6318:EE_ X-MS-Office365-Filtering-Correlation-Id: ba740f81-6630-4eeb-4798-08dc818f4c6a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|376005|366007; X-Microsoft-Antispam-Message-Info: 38YLa/oX6v78eoCtQzq5wdXN5Qcc1gu4b3gTg0MdDlJcW/LeKJYjWzF7mZod1S7c0GjMtUW6BzpjQEWslxAqYhxdKlIVFlm2N1wH0bbdlTolqPdCrpFJMv04Q9IhNQZSVoOQcCgyOsGCWm0SoFJI6A7gv48mi56bVaKqEZ/qg5J/wnUvzKB5ZwzeO+v+xBgcs7x2axN4Ofx8Cj9AvlwpilWe0fdXNLtcN5DdQX456EjAn5r+yrmC/6W6gKjbNtUwMN5RYnj+gI/PV/jjulQMcNRjXzHeRonS8kYS+a/zOFD+yGgqAqVrMR8AwJC9zwpMhozvmewdhM0x6YZx26trBmwoAAyalHXjCAQmYpLuzyTGt4V3HOztLH/CMGXTscx2OZR6H686I69fhNxTl8meHalowk5YoMrLMNNmXvnYG/6P+i2g9ZKBsa9SKuP6DlxDO3hoz46FtNQrgSJ3VGROOfmMopsVPqLS9RdisnFeAbpJpa7/kS2pld1Sk5CRFXOyH3Furjx2VKBr9d5bGKNy1E0tMnM+wHCwenp6NczXxMJZy/qhQVYpStvw1Vas8pLdNItTPhiij+iJq7hpXCQhlyPvmBIlaGPjyWNRXc+TTg7RBBAN2PCqqUuYB0PD8ic2KQ+C977RoXAA4zJPi08Q9m+Hi/jG0kL/maO0qb7hxlavromjwSb/2iyPjeWtI2maEakaxAO/uqDJCSsa43Dd0BpZAxNSzocRu7zc0RZgD+UG/No00RQCpF+NTwC6c2Al0YjQUB9niYdQ4IykMQiqwLr5pAICRjPQVgqlBCsZAKoOEKmttsDDnCWgiTrt/11h+ZY7Cz4jBGtaXq4D99crL8lJWFHteO+1+0tNdXdkw6tUzJT4dXmHqKsgmAbcHGy0Nvsf/yYoJUHoClEt5UpCQHiJTEfxrWizSH4bWGPSVVYo7jdhExRiu6QfbeQZuKpFzgRYyk/5MmebHCS6h7DZAhtQrVnVB7wlWq/7sGIqU+TVL4zZbJHycFzMGVzRQi66HAXqZXvezddYTk/6CpyDZPiDGobd6mvTfjabnZW8scAA94k/g/jK+6ZRKjRmdFFZI6/LGqINsmspm9FLFg5vu/MH7KgQ69mOdNFI4odjqlYi6txl+0kpJADGpnNbK8wNxGC+Suc7uZznbMW2F7wGmEfDLx+uPBmQPI8+wsQIpaiQuJRhjut/IGVm+K7DB3CLNmIZDXCdmJS0m8RjKUKiS+/JmQa3jZB01UeebqKttOmtyxyjLa1cl8lJew5uKgnlUPf+jWkzc1zXKT558f8FHw== 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:(13230031)(1800799015)(376005)(366007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 1sWvOmpEhG8Fglmgl3EUdjXw0khZczBYPWllIF2etVc8WKVAxxw1/OYnghIs2Ou6U0m+B2zTG3ZIEvq0GTt7aiKlWX9UED1i5DeB4ksvU8bDnS96N7ZEBdtzhs83ONA7/m09Vb6cZTtELkcGbqUQ/VulgywdWokaawY7pZnJap7gEum/fu5W5iZb44c+7Ps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ginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: ba740f81-6630-4eeb-4798-08dc818f4c6a X-MS-Exchange-CrossTenant-AuthSource: DS0PR10MB7933.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2024 16:32:44.2820 (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: yH7ZoTYauYkZAPJ34yalWauRh3MyPbJcSUp+Z9Sr/WyL64b8xN9rfc7XslZlBNRNeUAMkZl+PEuQuLMN9Geq7g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR10MB6318 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.12.28.16 definitions=2024-05-31_12,2024-05-30_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 malwarescore=0 bulkscore=0 suspectscore=0 mlxscore=0 adultscore=0 spamscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2405310125 X-Proofpoint-GUID: 4vE1ATAQnR7pmSNfj2aNkeEbCblKTWyh X-Proofpoint-ORIG-GUID: 4vE1ATAQnR7pmSNfj2aNkeEbCblKTWyh X-Stat-Signature: sgh68xcmie6a6a65o3tyay37k6gazwr7 X-Rspamd-Queue-Id: 461B118001C X-Rspam-User: X-Rspamd-Server: rspam01 X-HE-Tag: 1717173198-413531 X-HE-Meta: U2FsdGVkX19X5piqttE/GDIATOoq2X6Y3V1JTydY/35e2vwI4bYTFkMBCbRru6c8E6wySqGaWvm7Zy7FyJnKM8xrNVGa33ExWy3fD2Sx82xaP0tTepr3TBUk50kruet2NcKFhxKKTH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/7dWypawxpCCW1/4EiUeCEdtfXP9C025dWBah0wyaSykpLL6DzDl69DQ/O2lQMyRiaW+mCeqTscvyIbVaMXrP+xdGFRJK1rXEIlHHAQD1acruZfqX/an/8qHG2WH+vsPAPxuGjr6MNj3EXM/k3AnUySQWgLtx7z6rbMpysMl8MVYo23tXClDUteL14idaZ+6HdRvswe3AV8y/9rCsgzF/MQR7f4yXEPimRkJTGd0i6xCp68oZd/StT4MZmsxxL5e/InYxhjc2Lftrid9K9DWmZB6mfWy9M13oE76NvOLRpuAyMyYtGURoR 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: 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/mmap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mm/mmap.c b/mm/mmap.c index 83b4682ec85c..31d464e6a656 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -2442,6 +2442,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: