From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B35183112BD for ; Sun, 18 Jan 2026 14:52:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768747937; cv=fail; b=ss4RC1OWA9AVhy8FCP/7IxBkfLxBxNvFX3BWQwXFVbOEovYjxTxGVm870rIhQya8QGII6lQZAzWrSHZalqFnxY/V3JrVqcFSi5VU1Qta7Jp+JaFiZ3UX11pappLvQ23fK3NBe31cRoNZB4wLQW+pXvGPHVw5rfldIfD7HVZQML4= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768747937; c=relaxed/simple; bh=GDKgGC9GEYJID3V+vE1JFx51VPn0O1/wxW95FP5WxCw=; h=From:To:Cc:Subject:Date:Message-ID:Content-Type:MIME-Version; b=VARQkxsAVeS+rMobKQRpIue/IHM8hi3MIu8ioqjhDOP6Of4pO9myAW+x6abt7SiKWE1fDVOdZHnyqNFQ16jKhtNGY1o8bhbZEmR/KejDUVQQSqV5altBk4XmoHjPq3j+mPb+eU6dWL0jcvR8g1D9xMIRs0PR5EUPyCMlYMBPTJw= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=EP5xyaro; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=oXA0Pb4U; arc=fail smtp.client-ip=205.220.177.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="EP5xyaro"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="oXA0Pb4U" Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 60IEm6aX151012; Sun, 18 Jan 2026 14:51:48 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc :content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=corp-2025-04-25; bh=uZ/BOv0AM9UPqbBk qCuKvXvL11F1O06LcIEO0fERKPU=; b=EP5xyaroaeM2vivgActiHsP8RyAVyICs DED+GwTSawLr0m4CoXg9e5D/2bgDD3f/T/09hxuiQo4KZMrG6MQMzkM7phMhe1vT q2ihmAUegz9I9Oe3fzr9lBV8R7IZ59BWx6DeWjI/P/kApfmiyVIunrI+UP19InWx kd5XnrFQYOS5R27NWkMkBUwAf+fwhT3DqwR3GPbk6ZSJ/RkoZKLr3NlSb86NMu5y Oe+/ICZhZ1HCgvYT9HYcIj7vsR2l+Yk0YIj3pGgFaUZyEl7FXI3Tk3GuQxiKFCDg 4L5BFv094UntD7e26SJaBav3+g8h9drszT9WPN/UmFjv1lhdHjRoEA== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 4br2fa1b7j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 18 Jan 2026 14:51:48 +0000 (GMT) Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 60IBt4cd032145; Sun, 18 Jan 2026 14:51:47 GMT Received: from dm1pr04cu001.outbound.protection.outlook.com (mail-centralusazon11010064.outbound.protection.outlook.com [52.101.61.64]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 4br0vb7ctx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 18 Jan 2026 14:51:47 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=DIIEdY3JCwBoBa7obYS1+ud8SV6D8zfGZQV+y/HOn12QEjfRBVAxDpCp3pwFo1DZSzE65DsSl5FOt7/3BSCgg88tIh96LiGlzhB18eo5M+0qEMyZBPsGJDFv+HImUykwItN1vmst6KmX+j4bFeabuRuxnAPk4tP9Up0Vpx+Upz/QtB1OWM7qGo3g2PsGYZHTcz6sXXkdbUy8SgytB/7BJsB1Q/wfDQ6UlAtvMgnLXDEara4G+MP/dNs45YJoE8E3drl9TfbFmhYzEwZAE0PGmsjw5GlP+E3n9//tpo6HvJyTu76zmXAqgM0KbC6Iim9ouIXKvjXLivawOmOzTF3ujw== 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=uZ/BOv0AM9UPqbBkqCuKvXvL11F1O06LcIEO0fERKPU=; b=JvxLZ0d98G/ituUEsCmwDpvxa8TYUc3Ba185oQnZMlDgeh/HfPDKxLRcweiR8FIcuHfMEubTvwlQdrp6dxyCXXMbw6J6EPL20fTxcUMph2YV8vSatc1dsv3HzFNgvpKC0OYtLCQ57JRkxc7ex4ptt1F0LTtqERGZAtfJFWovcrRp0zSBfdaN1bgzMITE1UnCqXMvrcjXWHwWp1RBvRnvPzkruzCPa962lljQ3a3PU37ASQCJ1s8ooyHp399NLs7d22pvUlhG55LHJzZiwhWGfQ0FesV0Fj4k6dhwz/VEf0NgtJ3cJqwOPfuVIQSMcTaeJmAZs7IMwlAcrLMTjyGBEg== 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=uZ/BOv0AM9UPqbBkqCuKvXvL11F1O06LcIEO0fERKPU=; b=oXA0Pb4UdSPK29IQKFfcrMTcN+S0Z1HHIelzCfGwpdxeuJAuPM7b9ondfCQz8cBXjABiTCN7ZEADdj0ZtgChvZjA0IV/FT+TCJ700MLJIhH03mTQ7091TXOSMdZCy8d8QlwiToFoWn3B8g6FrMWWSybHKTk5pEmaC0BTSbVLOo8= Received: from BL4PR10MB8229.namprd10.prod.outlook.com (2603:10b6:208:4e6::14) by IA0PR10MB6723.namprd10.prod.outlook.com (2603:10b6:208:43f::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9520.11; Sun, 18 Jan 2026 14:51:44 +0000 Received: from BL4PR10MB8229.namprd10.prod.outlook.com ([fe80::552b:16d2:af:c582]) by BL4PR10MB8229.namprd10.prod.outlook.com ([fe80::552b:16d2:af:c582%6]) with mapi id 15.20.9520.005; Sun, 18 Jan 2026 14:51:44 +0000 From: Lorenzo Stoakes To: Andrew Morton Cc: Suren Baghdasaryan , "Liam R . Howlett" , Vlastimil Babka , Shakeel Butt , David Hildenbrand , Rik van Riel , Harry Yoo , Jann Horn , Mike Rapoport , Michal Hocko , Pedro Falcato , Chris Li , Barry Song , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 0/9] mm: clean up anon_vma implementation Date: Sun, 18 Jan 2026 14:50:36 +0000 Message-ID: X-Mailer: git-send-email 2.52.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: LO2P265CA0470.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a2::26) To BL4PR10MB8229.namprd10.prod.outlook.com (2603:10b6:208:4e6::14) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL4PR10MB8229:EE_|IA0PR10MB6723:EE_ X-MS-Office365-Filtering-Correlation-Id: 014df47d-3246-4b9f-87d9-08de56a118f5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|366016|1800799024; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?Jp6KY5hPTP/LieRaD+Vpf40VeTN1FyTzxyzlwBBpMXcmUtvOq6YXbUYBNDLX?= =?us-ascii?Q?GbOu6GlDwqVz99wNfpM1AXmX5j8TQkGYdMC3HBOdku945wCM8E5WZeMpIEeR?= =?us-ascii?Q?UJ1sHdfsH32QsEg54oYAY9mc3qti6tJ4E4wjNvNmOpHiccQx5rm/BYB/wyai?= =?us-ascii?Q?BZ2AkNEdRA32jydLT7NvS0bCbhCEgz0vxGokSE9yXIIczmEaQt8Q9gdfqDe8?= =?us-ascii?Q?oNB9xoWZ442UytebFzhR9yMZn1dGAx0pYi/4ozVgDLMwNXHxEC8+b/61PU6O?= =?us-ascii?Q?CJfapjvHb91l0rsJF3sp7PqppNn8raBEhqzM3ZMBOD3VODHQQhf6Eko/s/dh?= =?us-ascii?Q?AuN9j0P6Bs4Bs6PUcl7z6jeOpG21ALHf/RlPZNPDor1NIwqwf11eZkaxZBbs?= =?us-ascii?Q?BN6KPGVV4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AmVtkPlPU5f?= =?us-ascii?Q?IFDjJNqoqKbFAM0Xpbk/qJUjm0oosDhYLx0b6jgMhMRv9FO9Ay4dzseGaqFh?= =?us-ascii?Q?CUTlHOBEKaplPtNH0hePpLpWO4MTakL7iLVWxOtWf4loI/Efio3CSjvbQP+R?= =?us-ascii?Q?NubKovuGMS3BSyDJJtqttzG1YInTwKVJGwJbYt5ucGyHPLcBoW6AY0m/myHM?= =?us-ascii?Q?rcHt09bngK3yFFvFZ4F/WKya8GOPgR+zcSCnjwH6hnGhx+EwReQ8oXad+o4t?= =?us-ascii?Q?mKJFAMqOAd9S/MyPo+v7qBzvqgLs+CNPrgigGkUu?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BL4PR10MB8229.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(7416014)(366016)(1800799024);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?ruTBYw1ATvh7jTIHQkrI5KFSrkqkAYRPzogJoy2M4xUiEO6jUGeVoOIjnux4?= =?us-ascii?Q?JdXP0YFbnYzJVdOrsNk2R9jT3LElSN+/VW1JxyOzy5jMahF4jVJPHrVh4qjJ?= =?us-ascii?Q?aFtWCZdiblNkwCJoBsmZMY/SpHWu8KMHEmjomtbnlNLkhWwL9JWVPyo+K30m?= =?us-ascii?Q?F0gBJEHDAMZ4QTtBHfM484mLMGG0//BpGUvvAkl2qfFInnijlsaJdq3AV/gj?= =?us-ascii?Q?fU1Pqz7RNX5veWKIUKbZ3Z73RA6WiR8g683DWyPWPWJ8O5B3uO/mdGO4AisS?= =?us-ascii?Q?JYvDoCDzKj/D901GqH9LqYHVQMvsobkgHy3+LWlwtNikCDWL2kgaQEZhXtj+?= =?us-ascii?Q?d1PwjUHIdtg47GpYL/kjwLoc9VVydNzzeYtpbOhJVc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v7vYqhQy71YXg2Ggq2+mG86S5mhuAzo3WUND38/bMr?= =?us-ascii?Q?enbGS5i9ZtlKfjV37Z2pzBbOrW10WP6GdXI071UutxBYAIqdhtbaI6S8o8A8?= =?us-ascii?Q?VU4FudCMTsYUQ1GHNrGaVdI3wW+Beh+aeCKZPvBPr16/ypDj1gnQePG/IZV7?= =?us-ascii?Q?/4IzFW87/qCxJaGSf7NshloE/zNWlIdkvMDjK+stxvQ3qIFWNv/8+vI0/IJ8?= =?us-ascii?Q?I2sOG3lRJKelC0gO71vF2nd23q+umtYJMLtzjRUHFsSbRrQVj79uaHg6wEOI?= =?us-ascii?Q?zD2Ufc6pbbuaDuOZ+uEokvFMuzcS8QWhNZmUhLtgncoNZDRclPKTUxgNStkO?= =?us-ascii?Q?7k0WfCjCpxPF26pQ+1DSX7FF6xnyxNWiWbXxMmxkFgHu53zCZwfvgt8jaM+m?= =?us-ascii?Q?Rq02O5ROtlpfCI1nYIds7LyySJT+dnKxmS7NiMzM41noyKr9jt1E6tTPGnx8?= =?us-ascii?Q?s7I1PXYoRyLM2hw3sevEChw8GHK1Ntk=3D?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: FKQ8RdWteZt8VA6xrDDhMDQ0RkoZWhDwik3XKUID2l3AnApSVyHIFO+WKR0datNBTwKJ21toE5HgMTzxP5MgcPsML2kbT3mrPjSbMg+r6tL0caKzCsvbfWipEllcJ0WxhED1bfSjeWSunzN1AAgxLiPK6/McgCQbuvDK2pB+qrfb2aQpdGOpEd8Hi0gyXGVJogzZvlFUYKmC8DfYfogjz5Ps1Wi8Yth2iv5+SaXltkRqJmFj69FF7cApzXViw7wwdPi883KRD+KdLMzUh3cXuswv7bCFRJPFMBAmXhEnx0KdD9CF/wOeon6jFrdSr3/xzht8SiLR9rSkE0jiRKdumL1fYzU2GyBJrPpOFIC6yjG8BEIV2ZhkyD68aAI8ssF0qP0Dsf9k/mrmmkjzsUnTV+g1P7Ri0CM/OXvYRbI+PSKgFeDr2XKfruvtJicpOAuNIsVQ6s1VYlR+/6LQ90fECvczDGTPHd3ZWYTMBxVSSXQMrk8XHkSOpYbpOGyHm4lIX4qHSITTSwJYDopZ649x65ZYhlKYrc7FTEB2aRTP5WZ3uem42P0BfSc9OTsxVV4umYOGySv4V8OgfyYIh/Oj9y6AeyvBOl3+YA9SkC4STlE= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 014df47d-3246-4b9f-87d9-08de56a118f5 X-MS-Exchange-CrossTenant-AuthSource: BL4PR10MB8229.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2026 14:51:44.2319 (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: 3GK94+v+beuC1AeM9M4DkMC/vrM8FmjldqXktGKUpphfNnwreQ6IXnOtDVnZsTlQfvuJ7kzgDKaGSZdjEx02+N/vXztw9ocMVN0k7Sg41vA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR10MB6723 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2026-01-17_03,2026-01-15_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 bulkscore=0 adultscore=0 spamscore=0 phishscore=0 mlxscore=0 mlxlogscore=999 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2601150000 definitions=main-2601180130 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTE4MDEzMSBTYWx0ZWRfX8wYMI26uhaYh Uhcjxsswyh/pgghH8INIuk6hR/HP2Lrakq8b3cVlz2Og7YwOZUic76ruIYIgvccnvCdO2K9ebI4 pOnoSEj0P5aT1Pdz9pzLcOgtCn12mgzbmHCcBMVGJ5aKVI2BYW+qSFBuO5kvvr97BZpWr3ySglg 0xOVnZgwtOZ1PKoBOuVeJGp098Xo0ZOBKJ1KD01PbgdHE+hPf5EP4YKRe9aGqDdWyrpwIUkYQp6 SHTr9Yftn0M/cFrlX0+hzaF2lZalR5UZAhi6rmr4v5KjiBSNsDd81IAtJIZtyyNEUKvviE0SxR5 JJVDj7J1YDLOSQ+x4nyJh36OcMFFDg6GmtcLrmh7IqrlFL4Rv7fIARZcNfN1jRFd9K5AY4HzXLY lpgeB4wQwlaA2FF5LdTyatFI/qQJ6gLsMdNdHNO/FsInSHuv/4lwhHNzeVwYGFr/F6WuLnFR/hn LO+OfV2ZOaqMgDtRdUcYQlbjoxEadWlHxcKHczbU= X-Authority-Analysis: v=2.4 cv=HvB72kTS c=1 sm=1 tr=0 ts=696cf384 b=1 cx=c_pps a=e1sVV491RgrpLwSTMOnk8w==:117 a=e1sVV491RgrpLwSTMOnk8w==:17 a=6eWqkTHjU83fiwn7nKZWdM+Sl24=:19 a=z/mQ4Ysz8XfWz/Q5cLBRGdckG28=:19 a=lCpzRmAYbLLaTzLvsPZ7Mbvzbb8=:19 a=xqWC_Br6kY4A:10 a=vUbySO9Y5rIA:10 a=GoEa3M9JfhUA:10 a=VkNPw1HP01LnGYTKEx00:22 a=VwQbUJbxAAAA:8 a=yPCof4ZbAAAA:8 a=TCNhpU7RlrZeGyURkIkA:9 cc=ntf awl=host:13654 X-Proofpoint-ORIG-GUID: 4Q38x0Xh4O_neMCF8eyZdLIAPc52JcP4 X-Proofpoint-GUID: 4Q38x0Xh4O_neMCF8eyZdLIAPc52JcP4 The anon_vma logic is hugely confusing and, much like a bundle of wires entangled with one another, pulling on one thread seems only to lead to more entanglement elsewhere. There is a mish-mash of the core implementation, how that implementation is invoked, how helper functions are invoked and concepts such as adjacent anon_vma merge and anon_vma object reuse. This series tries to improve the situation somewhat. It starts by establishing some invariants in the core anon_vma_clone() and unlink_anon_vmas() functions, largely expressed via VM_WARN_ON_ONCE() asserts. These act as some form of self-documentation as to the conditions we find ourselves in when invoking these functions. We also add kdoc comments for anon_vma_clone() and unlink_anon_vmas(). We then update anon_vma_fork() to avoid passing a partially set up (and thus invalid) VMA to unlink_anon_vmas() - functions which are used both for partially set up and valid data types has historically been the source of a lot of confusion and bugs. We then makes use of the established known conditions to directly skip unfaulted VMAs (rather than implicitly via an empty vma->anon_vma_chain list). We remove the confusing anon_vma_merge() function (we already have a concept of anon_vma merge in that we merge anon_vma's that would otherwise be compatible except for attributes that mprotect() could change - which anon_vma_merge() has nothing to do with). We make the anon_vma functions internal to mm as they do not need to be used by any other part of the kernel, which allows for future abstraction without concern about this. We then reduce the time over which we hold the anon rmap lock in anon_vma_clone(), as it turns out we can allocate anon_vma_chain objects without holding this lock, since the objects are not yet accessible from the rmap. This should reduce anon_vma lock contention. This additionally allows us to remove a confusing GFP_NOWAIT, GFP_KERNEL allocation fallback strategy. Finally, we explicitly indicate which operation is being performed upon anon_vma_clone(), and separate out fork-only logic to make it very clear that anon_vma reuse only occurs on fork. v3: * Propagate tags (thanks everyone!) * Fold fix-patches into series. * Add fix for syzbot report about an accursed partially-initialised VMA fault injection error path. * Fixed a typo, a comment whitespace error I noticed and add some comments to anon_vma_fork(), set anon_vma->num_active_vmas = 1 to make it clear that we're setting this on a newly allocated anon_vma. v2: * Propagated tags (thanks all!) * Corrected typo in 1/8 as per Suren. * Updated commit message in 1/8 to clarify when we use a downgraded read lock in unlink_anon_vmas(), as per Suren. * Updated !src->anon_vma no-op comment as per Suren. * When anon_vma_clone() fails to allocate we have thus far been invoking unlink_anon_vmas() to clean up the partially set up VMA. However this means we have to account for this (likely impossible) scenario in the code and prevents further improvements. Resolve by adding a partial cleanup function specifically for this case. * Fixed various other typos. * Placed check_anon_vma_clone() before the !src->anon_vma check in anon_vma_clone() in 2/8 as per Suren. * Retained !vma->anon_vma && !list_empty(&vma->anon_vma_chain) check on unlink_anon_vmas() as per Liam. * Added comment about anon_vma's sharing same root in 3/8 as per Suren. * Updated 7/8 to have cleanup_partial_anon_vmas() do even less - since we now allocate AVC's first before inserting into the interval tree we do not need to acquire the lock or do anything special here, just clean up the AVC's. * Updated commit messages as necessary. * Renamed find_reusable_anon_vma() to try_to_reuse_anon_vma() for clarity as per Suren. * Added a new assert to check_anon_vma_clone() to make it clear that, when not forking, we expect dst->anon_vma to be set. * Renamed vma to dst in try_to_reuse_anon_vma() to make it clear that we're checking/manipulating the destination VMA. https://lore.kernel.org/all/cover.1767711638.git.lorenzo.stoakes@oracle.com/ v1: https://lore.kernel.org/all/cover.1765970117.git.lorenzo.stoakes@oracle.com/ Lorenzo Stoakes (9): mm/rmap: improve anon_vma_clone(), unlink_anon_vmas() comments, add asserts mm/rmap: eliminate partial anon_vma tear-down in anon_vma_fork() mm/rmap: skip unfaulted VMAs on anon_vma clone, unlink mm/rmap: remove unnecessary root lock dance in anon_vma clone, unmap mm/rmap: remove anon_vma_merge() function mm/rmap: make anon_vma functions internal mm/mmap_lock: add vma_is_attached() helper mm/rmap: allocate anon_vma_chain objects unlocked when possible mm/rmap: separate out fork-only logic on anon_vma_clone() include/linux/mmap_lock.h | 9 +- include/linux/rmap.h | 67 ------- mm/internal.h | 67 +++++++ mm/rmap.c | 315 ++++++++++++++++++++----------- mm/vma.c | 8 +- tools/testing/vma/vma_internal.h | 16 +- 6 files changed, 288 insertions(+), 194 deletions(-) -- 2.52.0