From patchwork Mon Oct 7 15:28:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Stoakes X-Patchwork-Id: 13824913 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 84236CFB446 for ; Mon, 7 Oct 2024 15:28:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1EA606B009B; Mon, 7 Oct 2024 11:28:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 173A06B009D; Mon, 7 Oct 2024 11:28:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EE1256B009F; Mon, 7 Oct 2024 11:28:49 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id CD3786B009B for ; Mon, 7 Oct 2024 11:28:49 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 8695CA06C6 for ; Mon, 7 Oct 2024 15:28:49 +0000 (UTC) X-FDA: 82647188778.27.53EC2A7 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf05.hostedemail.com (Postfix) with ESMTP id 388F2100013 for ; Mon, 7 Oct 2024 15:28:46 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=Sq0VvAi1; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=cTB68Ymo; dmarc=pass (policy=reject) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector10001:i=1"); spf=pass (imf05.hostedemail.com: domain of lorenzo.stoakes@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=lorenzo.stoakes@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1728314827; a=rsa-sha256; cv=pass; b=n8XWZLl223b0+JGfnxLFqWSSj17Z4d1UMaPle7uWncxRNKA0Bc7odNsQ5sDcgoXJaO5Wg6 y6fGuhPmROd8lt8Sqqm8vjRAZRXydfGxXe1RUH/KKSH8Bq08Ifk3aHoUWJrg4U9PZwsIqa 0MXYOQOARaep3FiC6Zyhem3HXcckGAI= ARC-Authentication-Results: i=2; imf05.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=Sq0VvAi1; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=cTB68Ymo; dmarc=pass (policy=reject) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector10001:i=1"); spf=pass (imf05.hostedemail.com: domain of lorenzo.stoakes@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=lorenzo.stoakes@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1728314827; 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: references:dkim-signature; bh=/zxbCU6GPmDXB4tj+h1dr3ZabASn5EsgGWggxKqanFE=; b=4fkXPpJaLcz/yK11T86JHrTpRNFqGfJPiIB7/McHJXXnnst9+uGu3q4kEdG/OM8YS3uJhF 6Cv3SIWLRyZv4vM/d/XTufELfb+10qiRd/JixrPfXzKdBURK+Um8MJ/oayv4R2isMuZTHx nGOr7weueabbiaF6v15fdmiJhnqBnxU= 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 497FMedK011699; Mon, 7 Oct 2024 15:28:41 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-2023-11-20; bh=/zxbCU6GPmDXB4tj +h1dr3ZabASn5EsgGWggxKqanFE=; b=Sq0VvAi1BY/jbwwLsCELi3odqDQ1vh+6 E7fDD1XZHudzFvMqvFV6j+DqUKFsBLVde4MI1ctpdj5OPjHGjUA19j2+pYkjXkFt vnN17EYfJF20XmuNJEKDkTUp4WnxKAStwNaS6NrXMq4eo+l9fDk/YDJ61PmUkKZu JpmH9dZ7FRlwoc4poTe8p9Mrev2E1Wttrxe8cf1vEYapuLDKcS/jMf9PYbyHGFkR sq6btEdge0MOZ0HZmZJNidbWmqy8sV2LjFNIWuA3BV9Lq9iVa01KCeVTksNIgWsq CYT8h7ovG56XQqCPK0E4YcwbPP+CjBQwhMJgcwW/iJDg5/jx6eACbA== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 42302pbk8n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 07 Oct 2024 15:28:41 +0000 (GMT) Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 497E4H9G012067; Mon, 7 Oct 2024 15:28:40 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2100.outbound.protection.outlook.com [104.47.58.100]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 422uw5xugk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 07 Oct 2024 15:28:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=WGC5t2DJEidYFc+O1dbzgoSqfeS6zXlZ0nNpcTXtq2I//hSnDTHDl6LLvjt2f6pyXrRDnWcfHO2vuUkQG3/8MWpou1z4xoogjdVdbiQPjh6UOshEVsQATW4EzSdT5tBQwVbOslhp8RyM7Z7YRnRV4YZvlzWKoCGaDMY9yQ7JSuOFI/KQs4jrcjAnS5qe0aIn5tNgluzC4+P3h+/PBFQJ+N72clg1OrVUBt23TUcmq1FkyOBKFTJp91vWToxiWKMibczcskZ8OuHZHYKY5bheOLalZorKzIkAAx+zWm9VDeUrziHAtfcUSLf86kj1Bkr+ZaVK/dfa9nkblY2pIcCPXw== 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=/zxbCU6GPmDXB4tj+h1dr3ZabASn5EsgGWggxKqanFE=; b=JV2Fh7zjwGFso5GeOERqMGHq3t7dLLl1C9VkesmrshY8m1Ib7NUSIKBr8roXExTSZ0ZG8EYlXq/YN/r1QnoohrNk9c9N933WKhmYa40BGFdU8jWveBMHUDB31qviovdGzRt5XxB9LCRcqff3P9VZFLapTTJYztKUCIOLRJIKMR4ll5beZpOhN+i8JEdxS6Hj/NQmOmWVSqUpq/UqlMs0Tz8XKEZ2rZ9mPDr+MfsoRlg8TUeDrzu/hiIUiXD0gjnTPpoQx+S2IKB56PeEE2jNo/P2Dhx4/MIZIUl2zY+XzuEYUJ3mdaThPg40IQaVlywEfBFYYRz8t2ngkwt8RL7SJQ== 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=/zxbCU6GPmDXB4tj+h1dr3ZabASn5EsgGWggxKqanFE=; b=cTB68YmoCEpTG0qVEvgce90HF5XhwbklcWh1VRu2t9uhVsr9jOHXd+FqJeV1icgYZjKWxXbqMuTB9srITkva3bLXHK48kXTsnnW0yZ2L9UYjnUfceOy9p/F0zQ9dVupQfQuPWe21pIGgutFueMfTaKKSfUIN9UkLsbBwdrTfB/I= Received: from SJ0PR10MB5613.namprd10.prod.outlook.com (2603:10b6:a03:3d0::5) by SA1PR10MB6640.namprd10.prod.outlook.com (2603:10b6:806:2b6::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.20; Mon, 7 Oct 2024 15:28:37 +0000 Received: from SJ0PR10MB5613.namprd10.prod.outlook.com ([fe80::4239:cf6f:9caa:940e]) by SJ0PR10MB5613.namprd10.prod.outlook.com ([fe80::4239:cf6f:9caa:940e%5]) with mapi id 15.20.8026.020; Mon, 7 Oct 2024 15:28:37 +0000 From: Lorenzo Stoakes To: Andrew Morton , "Liam R . Howlett" Cc: Matthew Wilcox , Vlastimil Babka , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Sidhartha Kumar , Bert Karwatzki , Mikhail Gavrilov , maple-tree@lists.infradead.org Subject: [PATCH hotfix 6.12 v3 0/2] maple_tree: correct tree corruption on spanning store Date: Mon, 7 Oct 2024 16:28:31 +0100 Message-ID: X-Mailer: git-send-email 2.46.2 X-ClientProxiedBy: LO4P123CA0664.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:316::8) To SJ0PR10MB5613.namprd10.prod.outlook.com (2603:10b6:a03:3d0::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR10MB5613:EE_|SA1PR10MB6640:EE_ X-MS-Office365-Filtering-Correlation-Id: 605f3b5a-198d-4763-ad55-08dce6e4b6e3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014; X-Microsoft-Antispam-Message-Info: wQVdR73xT+42/ucLF2m4Hs5xBqqaMOiI73uK7vQL/srmqBVVuZB6DreezDBMLW+tanoR2vWangrhB+sQJ5rzQ3uhBa+y0mcYQDX5yCzdre3Gi6E2gLXEaIJe7FOKnuZSHQD6Ct9RPwA5O9QGPQiKESIE/Fn/NadcyiJA8+U8dSBW0vdOLtLJC0/AGl5+KZiHKW5gG3qAielFy7KS67sRANBQuzst/tkSL3byB3zY+JfNrBxefEUQ+qU1HSWfK1h5S5vSHo8jv4Ldp3NySPTZN7dQGBQa87Ev6ueCBAdTMSGWk4EDsDBiq8hjZicfyvFkayTV0XCQYLyGnGqQnqFNGlTuPvTNdNZ9X6YnAyguTOcVSw5oQFbV5sNasPkP7c1P+3uc4IVicjbFYMUE3mvGHsOQ+Kgjyjp/DPnK4zz6VkzbeZObj5diCgkSSjFEMAa7wKnw2TX1KzE0sPkIA8mIhm6ukybAlDKEP6Bgf7VJzVDkQEmQG3LTT0Oy9/kR8hQiwwJq2RaELuMnwpeFmm67DbzyRaBcBsebhea1NpQ3/dWqej2SW4ZU2o2oD/L3kw2EqbwS62D8j2gA/SAl7IaPNtNNH+48y8wKoKineeFGR+qpwwIhSDVEpihEpnI5NdFsMsR3g+/uNtXXCLXeEB7Ht8GiAJUXIBLbDNknShwfhurk4NWHJHbv2j7MSQX6I7F2lpglwQBFKfXcpeXSNRQLMWOXsz9UuFGbDtF6++ijVyfllIuX6UUKLRLSKRylz4j/CQTFPp1YFapgHZ2If5jA/kOYdnm4lFHgjZiDO0rqUun6owZfAyCK8dd+r/uf5PfVtN0J6QuWnw1posMSqDSSIjUt4uaL2GMRI+zYhAJSztr1zhnrzZJzd+JCI/D/yNcPxb7JOlYPgybZU4mzVMRGFF1Oy87QDkgU8ftbz2cBqCYt8mS8kaCBbQ1oild9qvgSwf6L0LyoGAFxoKKYpXgSi/kyAzD9/OwTF9UvGB6M/+u5BnPwPowtN36k6tX2TfDM+woEWSNSfxh5dX2t2/hK+n+uKF7tj+wQGeb5nNMNYPr+iHcyNOz64crfYW53pBuyb3v/vCYD6g87N4+o/q4NEdKx4nP4hw0Xm0gw6Lmp8g0ORdmjOrGob2sGM56E7Rq/0txykVfCYCp2Z7xpEiFNHsuvlH+HIPvo6+MHSU8kn0lME7+Kgpo1oMz6nK8vhCt4fPoCjIca0wAXJXlKPr9xIbFVp/g1mX5KYqC/XvO8QodhrFjmlqRKxvhjDrMiWUt2AziAOU+8gnsdK14/t29B8W/8r8ifhwOrrpiq5uae520= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ0PR10MB5613.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(376014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ZZt6fOWwP37kHcST4ANPqoiFoQ8CabDmGpQ0lD8KhDac6FYBRlywpTRFnLXUya/nhYOCoTESgpQZHF1hJvXsM5mOC435Y/0Pgs5aQ6FGxlQWe9wSlAqz5HAfYWfLJAio935LVjlL8LPtM4jLLDqQbOJKIVjF7uaZs2VSBsJtzhQ222N87NZefDnQA66NAjYdaRZA1YZfrSeQdPm2m80QpeSqw5hwFVSaPr/Q5AETlLCZ753ewvI1ORpWkqm8CnC5NzHSnd9lPiRVaTcM5k4G3MSyWI14aE6rcJUt119nXDmkEzPOEU07aezvFMTPXrJzCRSRL5PkT3pYHyPdHULHh2BJ+tKTSCHIz6kGfTNAyKmm5J3kwE/+gDKAbkS09PDop5YFubSpG/d8DzAoJeazu+iMIC6d8pqik8+FxX0Xh5jAzmx3ZLklAwcFi3FkZ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5U9z+KWCLLActhChBreuZ3uR3JvSD+3zI3bI+u/ptzAO4NzsC/kqcflLGgN7CZhdj5Yq9Pwfmkq5s9hKA7WfdjKVXid4DJzA1I45dGg== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: xpS92eJOvSEa6ggEOim9AjPZPk4s/qwv6249QBshmx9UJaoLlzhFjbbYVqqNI7zFYMF+u0l01vm/sqc8Obqag3jiBRpCJcQeb5FuDFwmi/JsQbprG7Mj0FYt4XWUOYCjJTwu4HIbnbZjWCNQVDKCKxqtgDb1C9CgC5g3QydRQWf3U1ybD9/GP/V/meTaUs0e5DgGwwplhypiseLrH1XAfWKccag+6h/2U8BzSyMxHm+o8h3Mtd/OYfWsl5Ntw2m/mqr2EARWkRqdMbJ6QIySy334W9dyWa5BPKxqUAh9oJ0i9c7BJTyfQ6CPQ93j/3o/FXHKnRFkM/h4U4bgzHjIPoFgfKuqLsdjz1tkBueCkj9bVdtgh/PvWcnzJ7hdOYd40lx3J2wLvtEKkvpUjVLdRxjHdqwxcAhc1EPcrJJF1MQzFs6g8wIHTKXrBOB4fi7utTNcQ+hJY5EMmEIM4929Qzo13DeBYkjfQgIazH4TElmMfjo2xKuT1gGq2cEc4eZHe1rmQfghN7nUZUal812KU+dTXRiW0MSFF//G3eRZBTHSjE3OngWoBClSM4ekZTB6bnosVwHL/QMzKwiwrizLNN4FNELY7p1xnuner+RyfTc= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 605f3b5a-198d-4763-ad55-08dce6e4b6e3 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5613.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Oct 2024 15:28:37.5924 (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: v8ROOeZDJKlC3DkrdvsPZ/Dd0Qc6zRkiBUyCI1R5RVAHpFhb9mCDJgEzqSndRRHJ37g0ti847x4bk+rBNYaG/Zykib3KJVWFIsGRe/n5niM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR10MB6640 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1051,Hydra:6.0.680,FMLib:17.12.62.30 definitions=2024-10-07_08,2024-10-07_01,2024-09-30_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 adultscore=0 phishscore=0 mlxscore=0 suspectscore=0 bulkscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2409260000 definitions=main-2410070109 X-Proofpoint-ORIG-GUID: ukZ5SeY8a9h4Pp6TbdIkBh03xPLSSC6U X-Proofpoint-GUID: ukZ5SeY8a9h4Pp6TbdIkBh03xPLSSC6U X-Rspamd-Queue-Id: 388F2100013 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: nojecz7gtabk7trgr7ddgkkpzmwr56ma X-HE-Tag: 1728314926-126159 X-HE-Meta: U2FsdGVkX194CUTE+cuViWngxcSB5v7q2TIpAoG2lqbosZpHsqFxXm2/H+Rs3iLuIz7XiXGp3mlu4S+gV185aV9rSGafcBTdiysEuaAFXi4E4bA/MLyAWw3lj56HPSFDAJqVkE+0Sk9Fj+A+ob90ygvl2o6CP4NY0xnVhWfiQ2EExevroarKgrIKfzFXH66TFYUEYPqjsU/iJxIlZ0oHNa81Uho+3EUKCcmw0TQpRRkGFT8d8OJ7JpD8Q/0NFlSpfAarwQ46Am4WJ5qw7AaJd1hoB+qEV0byNmdjD7L+MPQIRZdD/cWF1m2Mjb1+NNordROgUSfeF7xMYwAR8QXm/sDJrGlczFxmAlatGATyoZBywh88sqSeSho1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gcx7z5NGUD0WVeYGG7aKd3xOlk2LQjboPcRwbSYtzfAj0gX0opLeFWfMOx80sIlL+NIXSxexz1Yy0zHNRE5Zy446fyY3RGgzEgNpFyH1NaxqjslhO2EjYUnQnyqmj5NeunpiuCFn8I5Lkbk/VRKYzt9TQUqVDC6M1DRG+HSUv3rTJ0dzbzLIJc1ZX5luQ6PHIL2uqoMVRVtyk5018fJ4Gw== 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: There has been a nasty yet subtle maple tree corruption bug that appears to have been in existence since the inception of the algorithm. This bug seems far more likely to happen since commit f8d112a4e657 ("mm/mmap: avoid zeroing vma tree in mmap_region()"), which is the point at which reports started to be submitted concerning this bug. We were made definitely aware of the bug thanks to the kind efforts of Bert Karwatzki who helped enormously in my being able to track this down and identify the cause of it. The bug arises when an attempt is made to perform a spanning store across two leaf nodes, where the right leaf node is the rightmost child of the shared parent, AND the store completely consumes the right-mode node. This results in mas_wr_spanning_store() mitakenly duplicating the new and existing entries at the maximum pivot within the range, and thus maple tree corruption. The fix patch corrects this by detecting this scenario and disallowing the mistaken duplicate copy. The fix patch commit message goes into great detail as to how this occurs. This series also includes a test which reliably reproduces the issue, and asserts that the fix works correctly. Bert has kindly tested the fix and confirmed it resolved his issues. Also Mikhail Gavrilov kindly reported what appears to be precisely the same bug, which this fix should also resolve. Please note - I am intentionally holding off on cc'ing stable until we've had a chance to be satisfied the series has stabilised in 6.12 as this is a highly subtle change. v3: * Significantly simplify the solution to a one-liner as suggested by Liam. * Eliminate incorrect boolean return type in mas_wr_walk_index(). v2: * Majorly improve clarity of commit message describing the problem. * Add a reproducable test. * Add missing maple tree mailing list to cc- list. https://lore.kernel.org/linux-mm/cover.1728223996.git.lorenzo.stoakes@oracle.com/ v1: https://lore.kernel.org/linux-mm/20241005064114.42770-1-lorenzo.stoakes@oracle.com/ Lorenzo Stoakes (2): maple_tree: correct tree corruption on spanning store maple_tree: add regression test for spanning store bug lib/maple_tree.c | 12 ++--- tools/testing/radix-tree/maple.c | 84 ++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+), 6 deletions(-) --- 2.46.2