From patchwork Sun Oct 6 14:31:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Stoakes X-Patchwork-Id: 13823767 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 73998CFB43F for ; Sun, 6 Oct 2024 14:31:35 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EC3AF6B027A; Sun, 6 Oct 2024 10:31:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E26096B0277; Sun, 6 Oct 2024 10:31:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C5BED6B0279; Sun, 6 Oct 2024 10:31:34 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 997326B0276 for ; Sun, 6 Oct 2024 10:31:34 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 187C5C1169 for ; Sun, 6 Oct 2024 14:31:34 +0000 (UTC) X-FDA: 82643415708.02.9EECE7C Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf02.hostedemail.com (Postfix) with ESMTP id D4AD280015 for ; Sun, 6 Oct 2024 14:31:30 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=nvntAkni; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=Wy0h2gTt; arc=pass ("microsoft.com:s=arcselector10001:i=1"); spf=pass (imf02.hostedemail.com: domain of lorenzo.stoakes@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=lorenzo.stoakes@oracle.com; dmarc=pass (policy=reject) header.from=oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1728224959; 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=4Lg6VrKyaS7104OKVdExCZZ5RMmQfWLZzVMLE0xno7E=; b=jvj7MiAP31wzMy3MQFGQbzYt6NMXNsgBUOLVcOqI5bE4HOaOAHeLHGyHx6c2R71jxARcQ9 zB+/cTyDT1rwjBDpSTfl6pOk8W1Tta0lSmOtEIR+h/O3blSNR34adsx/x3HVb9OSNxqqa1 PxQPCeoFjbIbg3N0DjwiinopZx/U6Ts= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1728224959; a=rsa-sha256; cv=pass; b=wkEgjcJWSx1HjRgq28e3EtYI0sVO+rF59Grj07tre3wFjqmRNkNd4dif82W0ez9RiMljVo ONK2bMWFuRHJYc/xaji7UOSYIq+hZvDeryGtuap8Lo5jf33q/EYMRWAdRewkhMTH3Bh0/r Pm/xuS1n+NwL2ZNeYZlRRLY1SqwFxHk= ARC-Authentication-Results: i=2; imf02.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=nvntAkni; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=Wy0h2gTt; arc=pass ("microsoft.com:s=arcselector10001:i=1"); spf=pass (imf02.hostedemail.com: domain of lorenzo.stoakes@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=lorenzo.stoakes@oracle.com; dmarc=pass (policy=reject) header.from=oracle.com Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 496Dq6nA024584; Sun, 6 Oct 2024 14:31:22 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=4Lg6VrKyaS7104OK VdExCZZ5RMmQfWLZzVMLE0xno7E=; b=nvntAkniyp6JoHZCEBfaK7I3ubEzUBn5 g+UPdTXRhiJVGoDnzqc1DqcRCRuEVvLMmBpvV/gYtv8tBeh+/HmktcdeVmb10/jN peUxjYSClpvLrb4dEf5iNbqAcX6LQq9NV1YJ5Qe4oC5xDg7hBa3Bmsq6RJy8lTId O2QO1aOUuiMUVUvvmPtno8Guyb5YBeJWHAj9zZuDoQtt31OOjdzxw/L3A/3KHOAd /tgw9t5lS7uCW1NzX9/GAPOpN1XRCFiDM9op4eX6U4+HzG1cjhk/mvQCk5UNoAnE 9yHOXLdqe19sh3hthcGCS56+lN4gfIlPrb+uNtzQ/SdoNp+5InsUfQ== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 42306e997j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 06 Oct 2024 14:31:22 +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 4969UD7u024151; Sun, 6 Oct 2024 14:31:20 GMT Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2172.outbound.protection.outlook.com [104.47.57.172]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 422uwb5uxu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 06 Oct 2024 14:31:20 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ftMd0MZ3PgqgbBVqfTalYUcjBsZv2NHIQ1H1163xn6vXCkAWDbPMBMGIZuQnNnQDmAqZFfypzXNsE5Te5iLTwffoz7mHz8ZpewIZDqQy7mJbpKVEVQEIUDZKQ0HtUWf/+qyhm4oQbwFftmVcrKu2XGMBiW2xs+G+buZ+m64YFY/4PmGkz8aTPRp1cJFLON0CsAZY/eTfERyXbx+1aFSRegvuJCGTqCysmWQw0F049em4zzozv8G9sxqrZqF1/lJYBgLRqOA7rmwK0Vvs4BN5JXyjw6DR3IxTJ2dmpKuKQihvwiMTBcSvp/rLupK09oi4zx6cdtgE9st+PlIsrQPlUA== 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=4Lg6VrKyaS7104OKVdExCZZ5RMmQfWLZzVMLE0xno7E=; b=yDghcdjOw7ZMCcptzwdlIF9a9TluLMpWKE0ENO2Zskd3G+TzTgbda5LHYglE64LVwDYCJF9VY0Xx3fBxcQZJF4u0iBF+PXVVdcbg6gSv6GQZ7jwFEnCkxtrJfSN5+K24vPkHjuFbKleoKHl1L9FWnmDDxX4HY+e2Cry/6Db/NANGUQTQRIFISSf3niAWtwVp5DMgAAVi0J0Isk1VRq9Fa+sEJBu1PWU6pWbFafjVMrZFcMXXoF62IHVeZMJHEeHdjaWugbgn5kZGTUuSeWFMe5yeQDoBAW502fxQdTJ6K90UnqU9R6SkZvHeu3UCwdDQSmZ2QmjmX7pbkHH3PEyU3g== 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=4Lg6VrKyaS7104OKVdExCZZ5RMmQfWLZzVMLE0xno7E=; b=Wy0h2gTtn0W+NVB8rNtPn1qgcVNO72gb4aUhMxo5ZsblwdJuw0lI0UZbmnbGvG0BXMvl/SGP7zR3kSbedXjmH3VWLTYCpDQtu4KYZxJR/WNhTKsDQ2rjTSCt1XfAk90zoteA6pVNwEyUr6mdGDhUFGrG6wfU8Xq0nlx3NFPoyOo= Received: from SJ0PR10MB5613.namprd10.prod.outlook.com (2603:10b6:a03:3d0::5) by PH8PR10MB6503.namprd10.prod.outlook.com (2603:10b6:510:229::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.21; Sun, 6 Oct 2024 14:31:17 +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.019; Sun, 6 Oct 2024 14:31:17 +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 v2 hotfix 6.12 0/2] maple_tree: correct tree corruption on spanning store Date: Sun, 6 Oct 2024 15:31:06 +0100 Message-ID: X-Mailer: git-send-email 2.46.2 X-ClientProxiedBy: LO4P265CA0160.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2c7::19) To SJ0PR10MB5613.namprd10.prod.outlook.com (2603:10b6:a03:3d0::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR10MB5613:EE_|PH8PR10MB6503:EE_ X-MS-Office365-Filtering-Correlation-Id: 9d2f2444-f02d-4b4f-d525-08dce6138a15 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016; X-Microsoft-Antispam-Message-Info: OH2ufI6fS3WnC6t9uD4Dno09q44eJAGf3ADGHPt1IFy4cqVLgkZRAhtxsVJbwTgZoB1wpVzFVrHWlP2aRs3shwE6O6x7fMdGsvDBFfJu5mjEE/jJvU2Ydqh71oQrrKgubICtcM6BBjawK+ZA7n4fukVFS40i/6X4FI+4q/p01sKnO8qtMU4Ct8P96Yk2OxIi3XbfkCapFqAdYkMl/cgdZhCPy5hheNzGYiMBrbFmvPlcZGpN+hmrdhew6cpulE+vaXyYD7V0YD9PfqVOiiwrw0LIk2X2R2hl1uoFqz3wKxOySGjeVA2s/Dp8u5Z5I8HbL7lREHH8Fn5H3ps9IBQ+KIrfg9q03Rmh2gu5oZW4yVQ464Ce4/U4IKOyb4J01RcEvrD2Mfsui+GdD7zoi9Os6iVKz3po2hlza8Jw0Yui24DpXQxVbSDybRbdhJv/6aT17TZ84mh31CBpbOrZGZu1Gz4vA6mzMaptk9J2IwFYhBUh/W4jmxumpwx4Xy6N3l8rQ56akXP15hweYGMn1UfIdLNWw359li8/jm/8ThduU49zRYiK21Z3WNOxPY4GDgCI2YWPKR2ApZu2zwJN4AcxBE9ND+0P3iDnzZ8X5hL3QOagHZmcIfRPEdutwII2kWB/lDAhk3B0UwLxCe5Fg0INcnI421UvB2+MOVWJS1a9OiOUnouF5TpTHBIsCUbiRfTVbcKM1zkKB/YkTqLJ9Jnjm4OxKgcAQAzbu4prMfTM8gBA3I44rv3wLWtLcJuWFbZ3fVBnbyC1QJIN76zhnbBJ9vHnT+GvbVZyo3ELbpqTAHBcCTBISxvGEZN0WGw/fKDcjDU1iQdB472qmkyIH6ito2TtkND5Qmv+s7fAHc7b47p7ZTwWPNeSldiaGp6u6H38bCBzd8klqLxnak5ADfjJ319BYdvBdCtmgxoZHaCwAyHAgFpnWRh7NxYzDGK5yUG9bB3ZQAhX5uNfypdM3IxOqrYWu6g4gsPLOPNxxp9QqcvgKICEubmWfVA3mxPqlwFQsGVGMHpRZO8rz3NCaAFGUoHTx4u/bg5dMHO2I9qCxcCXKJOsZdyDVXyx4AglJh1+15iIrMX8OVgUugJ6/jd7y329D/Yy7G4GjCv0AYWz8TOQ9SLESM7GRDKhY6tCt2OWeMwsZfCFVO2unAQIpIpdXINrKH7tMr0VTjnFvL3W3ylcbMVB8QqKPk15+rUNts4AYCY+wndQgHpffBe+Rix6+aLqEwf8/B2uaVEv5RoxV4X3dakpZhn6gZ9S5C8Cq63hDm7gWZfAf3gvV6u0CENtVQ== 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)(376014)(1800799024)(366016);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: jc1ZMuKHZdtu1jg6hqjGw+nDrnK8JZAerIvVB7CAP/ko/aHbF4R0zQ18GYeLqf995CeDiOA5Rd6fLxCbrPwk1fDVyw6hj/o8oqEyakH0UCL1JN+FvJRWTsmRkn/zTbJZDZuTtxFYpbGosxFGp3lRCmonRhqVgjiE1Ro9ShqKvaxxPVZ4zbgSPgx+lBMvyvm/Xh/2wj6di5tm1DdDgaSo2mMeG+sgPnf97o1zT6CRH+nP/FHGQ+TKsnjsF5I5S8ImatZmWBGaRqKGW9+JiRtpH+QbLUjWTh5vINalrPU/6eq27i86Zj7JUWroUJsbGTpUpvLB4tRIK9NSIGTcxXUq1BMQ7FpAzo8sqeN7T+1vGhVfkusJp0obtc/ZSn3SHEMDxWoCuhVIDUTjKmPbwEbqRaBeITn6JuEvWsEmKdPt5rT1d/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pp8Mj7dm1eXcuweaRDRV8LjOs/0HSXUJREj+5Wdqy4lqQK+NOspOLgcX3vsL2Lk+9+YSvQnjxe6gJRsQGgXF3RViQogC7PpFxqQ9v3taU0pg== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: s9lnyaTxXw517bM77mesNie1aLonC7n1U7Hb5diWUSswqu12ltrNU8/L3QiM/U5un/VymmgoJJMYEBb2futQbaAHtlcj1qWdAKU3b3aSDPgxD1ZFKv0JPO2GVcPuT+I5R5JJUCZwkRTSp4qfl+z7mcuex/1ZWpS6LIsEWhB7sCYoV17LvkLOGORDTiwwQ/1CL7cLvfMpVVUDAU+AfHvj68JE8JJ8mP0qGzIkW3p848Xzt+Epgu3CQaaTVxEvS2X6BVFTsu94VA0jTTm/moPm813Ld2sFSSbgCE4UfEpVgBPIAx2zk7KnGae+9K4PH3XJAheu5WphjJxqQiObCiiEJOQz7Ws6w7y6xtAQqMvEVcJ8I7hiPZmPHYy/lXYTf/qWEjOXCa6ZxVD6iulxDXPkXBXvN4YxVKwUcoC1HqxhxGwG/4ZJwlJHgi1ZINqHkFBMA3/cLTbBtJiXHnEs5IfombSMBE7trcSMeC7eUb++Pf0kvNQ77WDNSSBkri+bo2O03VJRp1VCSnChxYSdl31u9NIkWdb20tbhZ12pgJ50FisgpPIGq2RJWiV+HIqYS5tnadXWExQ7VPR4EomDws5RhCq93j1dYZkHM2nXVeiYmTU= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9d2f2444-f02d-4b4f-d525-08dce6138a15 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5613.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Oct 2024 14:31:17.6243 (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: v81ufmDQSpK/VYyvVhC45XtdA9j73zvId5QNlvNXvCetbCJwRUQKLTDKyNPqKfIJw3bu4B6zQqBQ3tl0E+i4T4b0p3+DFw39GPxVg5KAqVQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR10MB6503 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-06_11,2024-10-04_01,2024-09-30_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxlogscore=961 spamscore=0 adultscore=0 phishscore=0 suspectscore=0 mlxscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2409260000 definitions=main-2410060105 X-Proofpoint-GUID: uNa2rpViyG1ARU_8VW7YJQqruBxqg7JU X-Proofpoint-ORIG-GUID: uNa2rpViyG1ARU_8VW7YJQqruBxqg7JU X-Rspamd-Queue-Id: D4AD280015 X-Stat-Signature: 9cg8jbz8g3c934oyf41jowwnwww16d3p X-Rspamd-Server: rspam09 X-Rspam-User: X-HE-Tag: 1728225090-93585 X-HE-Meta: U2FsdGVkX19Uc/PMzC6q1WRvMAbaokglj4lOBUtAuTUdZlKECmGHhSlkQe1PBJhwYsT6azyUzJAEj37KWPE2cQG0K2iZxLsodhCKzQivgLo0nwPCSR1XnIxkQ23XD+4Ti8g9ly6OQXQn0Ml77vpIlB14rUy9XoCKUj46XndaWgkpG+LkSh9JnUBf4rp4P1iP9mrrk7m0jkieN0Bs1Xake5iqXp4iErV4NF+xDw0wALzNCV0Rz/3fCenu3o9uAjL9lTsOWySjDX4BcLbwuC5D4kRr8f65Yky2ZfnfZ9mEH7MQk1XaAuG2WYjIktpZlu+6sKAUcsetIgeQZ/vMaUtTZH/0fKZ6isehjt6/BmumthVd8cUsNzuDAhS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B0+h6Ps/vBE0tWN6+R5htKttqTGtROG4agvqWOOhcY/nqIBWO6lVsTR7tq/wrKc9Oxgs3yzKy6vusz2ok1HXHge/I61t49DCXSJ3e0yhOvwj38pWqcQSPmQCPkiGSFfiQjbsLAYbg6F04CDzviFUMbuQkM5Dcbk5cXGQu4GYzbcS7myXB8gK9Dsn21tBy+CciphQdRWOPPIrGFjZnvlc 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. v2: * Majorly improve clarity of commit message describing the problem. * Add a reproducable test. * Add missing maple tree mailing list to cc- list. 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 | 20 ++++++-- tools/testing/radix-tree/maple.c | 84 ++++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+), 4 deletions(-) --- 2.46.2