Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp32086507rwd; Fri, 7 Jul 2023 08:29:57 -0700 (PDT) X-Google-Smtp-Source: APBJJlGVBwSvjunitmxwQHs1cT5VwM6d7uw/xsro0/wvnC0VoDeuC+Brw/3zu0KXn4vUA6O2+FEK X-Received: by 2002:a2e:b681:0:b0:2b6:fa8d:ff91 with SMTP id l1-20020a2eb681000000b002b6fa8dff91mr4143231ljo.3.1688743797593; Fri, 07 Jul 2023 08:29:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688743797; cv=pass; d=google.com; s=arc-20160816; b=Jm4nmgekvAxP8/+z7UDRm+36s1M3J8KZWl7xoUnwZTrh8I097bpomD5XzydK7s+Skr R7qcNplCqm+WercD6K77aZr/dMseXkpB6iRmyXpHsnodC6vbhTfF2W7ozUZNVrjph15z dA3VPU4bp+aKiZEFS97Aa0vLgJC4gonnA+i7I8+bI3vJ8vimCZy/MBklQVgapu4IMMdF K9kIfWwSBnfMGD2yCiubDuF+RSTTvHS1t+9uNgCuf8D0QAPH4zIbwQ6JpqLNKnmMr4Ej 2Qvo2H7MwBPDFgwo7owe6IAviO4R7eY16csFBjhfyUuITSSlWSz9zvtVYc4F6pBPBrKs 61yA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:in-reply-to :content-disposition:references:mail-followup-to:message-id:subject :cc:to:from:date:dkim-signature:dkim-signature; bh=1Jxka2b3s2L/JcozOWAV6Kxg/YSmQLNDpA2X81UrNvQ=; fh=M9TAVnnZohxOnBl+tymLVHXK9HQrGJSEanKcPwO6xug=; b=SisbqTB5z35iY45bLGUkXqnTs/rTSs5XSJAAm1Ja/8D1HbgjD9u99+3yKBrnMr3ZGv PEtuvRIjUMSEHlHU1gNW8LKMouLb9A6E6sSsz2Vo0lyvOBtbMZpoQWog3kbhl3BUO6JL 9V0vXpE6KqU1YlY7oyH3yI6o6LGE9fvDCRLxuHmvaaTJaXFPeO9qxREgNN3YlWx4agsB Qh+7LHsev7mOa+OObFexo4A0BHgG4ZrBLzr0gCH8YvytJgOG4e8ziVO2RGACkdPFwb86 zyKFLRA76FdcuSxowdA4PzZ+fw+T5QF50SdHkLx194hb5kr8lWf6eOUI33E6NdmTxZxF +how== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=mtx3PlAo; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=ID4dCPog; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dk24-20020a170906f0d800b0098286b503e4si2372942ejb.1041.2023.07.07.08.29.32; Fri, 07 Jul 2023 08:29:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=mtx3PlAo; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=ID4dCPog; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233325AbjGGPT7 (ORCPT + 99 others); Fri, 7 Jul 2023 11:19:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233387AbjGGPT5 (ORCPT ); Fri, 7 Jul 2023 11:19:57 -0400 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E1F72685 for ; Fri, 7 Jul 2023 08:19:53 -0700 (PDT) Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 367FFsfR019327; Fri, 7 Jul 2023 15:19:08 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : content-type : in-reply-to : mime-version; s=corp-2023-03-30; bh=1Jxka2b3s2L/JcozOWAV6Kxg/YSmQLNDpA2X81UrNvQ=; b=mtx3PlAoZrPKgM5D1LHgKyffjiGAyHn+RP7uHsfbzfw9R+kYWrK8R52MwiOTXLOdMgvQ Qrn3ztQVeKeZOctEzxxgeBTFzSG5L9Dq4qgm/ArzlBiH5GL7pW0FMn/q1aZNO0THvEzH jm7+eoJTpokuZ55rCXxVdTRTO9mEfQFRSfNLjk0I15WYvKEedMiXQr3uLcCMqaZIqS3Y 3hQDuaMlvkovkGJdnDCUxWzM7x5p+2mYJz00D4BhjorEX5otUONedUE9cBpRN5+ZxCop dytjocKnEbXW0u6LEGrifObMZOKQl8TCo2qB5Ksk6KDVdp1ZCkt+MJCPCeoJ7MIFXgy5 jQ== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3rpn1j810b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 07 Jul 2023 15:19:07 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 367Dqk88001823; Fri, 7 Jul 2023 15:18:53 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2103.outbound.protection.outlook.com [104.47.55.103]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3rjakejhbw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 07 Jul 2023 15:18:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=itVKdu7TS85CszArnD3iEN3agFaEAXSbfx98UVFMliBCXrKY8OUCqFtF+l83C9KNA6+u5bhWy+Oa+SChaYUY1p9DdJ4jdDc3OS+9U3T9/67w2xsMsJT+EPkXx241AUFg8E2Y+umEMOF2DfAt3He1s7XPv5KmqfbKZdZ6IH+hQND1p8btG4wt8tXy4Fz05j5Z5WfDTIuw0+sbOxjxqQBkmsmyUNFJ+kLTktnezlJ+vp43z+qF+TGRm9ULAcCzn1Y0AJvJIPLZprNmNTBUjTJ0yFAMew/AZ8MZRfaex8Vsd4SLtikWuLbOreVXNNF7wOe6tyQS1ohIGkZapbUevqL1Mg== 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=1Jxka2b3s2L/JcozOWAV6Kxg/YSmQLNDpA2X81UrNvQ=; b=mG8HsAdugT7XGHTJwU6hJAdOIQ+VJ8e/MBeKjp4sDW7v/Gy48DbWWIL1cnGbkCt4zptNzhl/QNLwP8aRHiPN2y+QibGyc+8LiLr9iurJWhPrCuAhqyjIhNYqcA476NY6cjEU6JjFmOCEI2UqF+XiKuPvMVC/2hFzkIr6o8YaGgwyTFSJu/A1I+0o48W1KAQey/8fC5RbbeLMrQZbPs9ck6If2uDheMV0ivH3089NqbzxGy7OnZ3ZyQzPlu4qAWPlIbXCu561tcEg3ZMxp053yT43AECzkIx7Y17RagmyoVnI41GnlsBdwXvINJmYT/nyAny0B2XY8ykmlJOHBuaNOA== 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=1Jxka2b3s2L/JcozOWAV6Kxg/YSmQLNDpA2X81UrNvQ=; b=ID4dCPog/SU/XjHrV0paVHnX+AJGGoclzVwjXWv/dlVQPHREGnaupLW+mE8ioncUzIOo67p5rO4mmoYwnY0UsStLTcELAlxEvyHztxxLWC0v8vEDE0iA9yzPfJ2wzVrWXbr2oUGkqGuj6J9ehrVfGXxB7nUe2/vbh8h+90XRRmg= Received: from SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) by CH3PR10MB7330.namprd10.prod.outlook.com (2603:10b6:610:12f::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.17; Fri, 7 Jul 2023 15:18:50 +0000 Received: from SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::998f:d221:5fb6:c67d]) by SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::998f:d221:5fb6:c67d%7]) with mapi id 15.20.6565.019; Fri, 7 Jul 2023 15:18:50 +0000 Date: Fri, 7 Jul 2023 11:18:47 -0400 From: "Liam R. Howlett" To: Peng Zhang Cc: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, maple-tree@lists.infradead.org Subject: Re: [RESEND PATCH 4/8] maple_tree: fix mas_validate_child_slot() to check last missed slot Message-ID: <20230707151847.xzhnismksfdf7ye2@revolver> Mail-Followup-To: "Liam R. Howlett" , Peng Zhang , akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, maple-tree@lists.infradead.org References: <20230707101057.29326-1-zhangpeng.00@bytedance.com> <20230707101057.29326-5-zhangpeng.00@bytedance.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230707101057.29326-5-zhangpeng.00@bytedance.com> User-Agent: NeoMutt/20220429 X-ClientProxiedBy: YT4PR01CA0447.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:10d::11) To SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN6PR10MB3022:EE_|CH3PR10MB7330:EE_ X-MS-Office365-Filtering-Correlation-Id: 2b2f45ee-f1c2-4b29-6bfd-08db7efd77e0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yzf7ZEvRT8R2dcVK1RhZXA467v8XahvQ+uQrcpFGOTInZ2Ntlq6mVe3ajF/6BoyUEJuCSY47NnVT7MdgSTYv6QcMQRlo7GPHQcsvZlv3fd8KBUl3yTbJE0MyjASyUWpW+U0FoRluF16ykR0/DqGWRJscDLKzOPjHneNxGmENCbtyamNLgAwIVpAA4sU/ccgvl1GeFWYKpYYp1peVvO/BBdYBPPyQzRQXEMKlyjeOI9WzViR7hEkYIi2KOIXEiQ8wc2pP2DbJPyW14vIRJyN03t1b9JndD7dY/Mhjr3imt9uDYfDS0qSsgnHIjqUMrjqBO/UgBjMYFL9JNYmReUshv7bh0YvVuCLgo5Xl9uF9nGpaU5V/JYrOissWXFnUDvQi4QN74DxidkfVr3q9A8ZMuKCS70KGEXoCHt0dm95Y38WBV1WX/sepNfNtv7On4aAwbTC/sdApgoNLbvz+Oxi1wPh6qdpWCSNVN8rAvo0Mo703+wG8ugl28OUUIwfKNVL2kb3NMFsGJTNM2SsMqyq8LBp7xzNelAx6y28a+3nXoflQ5zhw+Fp/g1ksaVap2hsH X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR10MB3022.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(7916004)(346002)(366004)(39860400002)(136003)(376002)(396003)(451199021)(41300700001)(6486002)(5660300002)(316002)(2906002)(8936002)(8676002)(66556008)(6916009)(4326008)(66476007)(478600001)(33716001)(6666004)(6512007)(186003)(38100700002)(86362001)(66946007)(9686003)(26005)(83380400001)(6506007)(1076003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?LszjcQowFRTVwyfIAHgFVJLwZLLrcShTVPcQQ/BawJSl1n+HdepGbXgif1Hn?= =?us-ascii?Q?XQWARyJax22v8EUo3yhhU1YiGAv1SxFtJUlfC2Qw6pKHUhgDQICHNzkNTwmV?= =?us-ascii?Q?o+Ip3brSvqa+pv01w41lkUqQ5jMvMZ0LXvNygovOde7/zdipdOSYfeBOlY/r?= =?us-ascii?Q?aCwNQNycmHwp4uWQo10rhkHzS9OSJB4H3i4s5RC730dBN3cNGbBVG0mWzCL6?= =?us-ascii?Q?u3xktIfbJblcw8iKtRNq2VOfXZNy4TIG+S2WsKip/Z3WbgV5ZF/imKsI9z8i?= =?us-ascii?Q?SkH4RKrPJBshMuyLYrHAKQZC6XhA1Jo6WDRZY0pCPGvG3nxYJPqPWNsKuOP7?= =?us-ascii?Q?5zdJ2M8Fh/AG69/mKXy+PcacYqUPPnmNrPwDbtPtOxAOUy9UxElmGq8vHLd5?= =?us-ascii?Q?ppc0KHDdd1iyw3Dwj1a8gvcXzcRMBnDHYW1HpT/nFNrBbuwkn8B8p2FAuJeb?= =?us-ascii?Q?8rBX2KyCNAbMsW9jdNYL0QV1VTCm5NtBPDs5QtwMpXVWI4IQa6G1bZF8Az3l?= =?us-ascii?Q?e5L4urdyqPCc3akgtAiV41D9y+J8CTJ/K2f/vaJaxtlHM1Bo2hzNfhblCkFB?= =?us-ascii?Q?abwdojGP/5SQeI7/C6epPhuaMXSDHkBa+qk/mQfUAQgRcsCh3NofWwhIVpJk?= =?us-ascii?Q?IjPYMCW3bScpoeHDlxzM9YegYlRzqBSLlnbN2HodebJrjYQ/wgcw7jhz/k0Q?= =?us-ascii?Q?z4znHvdV0udd19fmWrSEIgZDSFd5VYMA8qbHlUrTmiF0nJXOm1Mgax22jZgV?= =?us-ascii?Q?TebE2ldrmiqq8YjtrE+gcXlvtu6bBIqRiluO/HqB3WXg0BTeSsm2hYxuHp+w?= =?us-ascii?Q?DihILvCJZ0xA83xoTpXBlipHgPAzuiV0CdJjckylY9IpIPaNd8dlvjYsxDEF?= =?us-ascii?Q?1fDIwOk6vxEVbghhqbeYbqvJ9SD8a2Ukh7pPIA1DnW8ZIbw99dMP9NGk4dRk?= =?us-ascii?Q?PfMgOpxBlo+wXVggxPIbanwbZHYwsWncWXZ3mvuPIlc2Tx7Rq4d3t9b2swz1?= =?us-ascii?Q?wDhq3QoMHwbfMt6NfPWLX2v5jcZrEb3SFutlKKWHab3mc4y43JQeWzO96mGZ?= =?us-ascii?Q?qwKbzuZ+soBA3PUVrKQ1WRI3iZhnDoyEhteMdCfLstDcv+BfQkM0NMOUN1lL?= =?us-ascii?Q?q9EDO27Q2o3UZ+Q7gLVrMlQkOutv7vZNT5wY8g2PToWuC/Jjpt8SxphHKjYQ?= =?us-ascii?Q?IW/dNXHHAS/W5cdEaxUOw1pd1MmpC3ZuwxGclWY9CfpGpoz/OBCPP4gREY7C?= =?us-ascii?Q?MrUIi5NQgMb63BQeEppMWvHfkosukVZaSY5xP1XjSLi3nLeyr9AqT6bnk0sp?= =?us-ascii?Q?e34d7W7Ahb10ixTAefA3MtwtDZ4Ne0fvMJyDK6VzAZ94dXkYh56E5cwXYwRi?= =?us-ascii?Q?hx6YQRHyItapsyLSP5OytfCVI7Gc+i5Hpwt4h7R6ZzKsOoooVWrD5Ee0xWHi?= =?us-ascii?Q?uDjRXDDRG0OFfNCzKY3ZsLwWoHaDBKfYNCdJ3vVvl/+D2KOQ/w8qnXGu8rg6?= =?us-ascii?Q?WWFKOLG4g0W/JsFFEMLepFrlBRqJZUwxw3idv30VLyF0ZdOjsh/rYpQUthcQ?= =?us-ascii?Q?OZt8WHD7YoSPPkeDmoT9S1Yxd1ut2pLJ490I4youu33ym4IGx4BH1MYkvZ8l?= =?us-ascii?Q?Gg=3D=3D?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: =?us-ascii?Q?31YnHtVCTkQaym/x3H7KdcQ06KnyriYXcZY/mJstUSJzCNHx9xkOGIIms8CN?= =?us-ascii?Q?kTpR097A4vAw+A4Wz5C89v3hTJlnMqjPjQAVIvVMtsJyPUN259OK3CYVkWb2?= =?us-ascii?Q?nfzvumWcMG8izYJCtk0zUfyQN5ycWxk8Qt0+Kcv6UM//Ma6lz1ykW5nAt2Ib?= =?us-ascii?Q?30jS7voYhV2EtPpc5GLKdSVyhlCTcDI8bUOvLnczvm+gnJp9eiykjvBzhqjB?= =?us-ascii?Q?HCCe1yYUSAx6eUqVxMg9SEGQ/6fLdra3bg4wtCh1Pw16dHTqBUsxKJ0uX0Mc?= =?us-ascii?Q?plguG8aoK8rqNIk5bCpcF65Z9729UP+ZhgxntlCceOB6N3rYZ7UcgGM39OkZ?= =?us-ascii?Q?H/bHqj1XvPth67kNnYTyup1ozZ/+8tutoxXDO8JDxCYRKs5nZMoFFz7Vy4j0?= =?us-ascii?Q?R7G21cnFWFaIRLqFPD5iwbl2fP8h2XD1fk0Sz0t2LRSzr7T8nKYdABsit9K+?= =?us-ascii?Q?3Q5jAYo4GkxKzuuf8lOTZPCIakoGw7UkVQ0tlSdy+m9punIA/2GBJ5D2ENeI?= =?us-ascii?Q?AUV1MkaJ6eWMr9D3Xlh+PGj9DBpo/Bd0auVHsRJ5LQX1hxf8hTx2VLTTl9f9?= =?us-ascii?Q?qqE3ZldF6rzcYf0IbknqzlkUR480bdN819iEm2/EwQ1IdIWQ9d4IXARCAcQV?= =?us-ascii?Q?9WssTd2NgypdAhuh/sKMujU+XppJ5t38zE0x8TpZ8Jfwdmr578BUr8qVyNN7?= =?us-ascii?Q?+gClD7PwV+ySPXFscR720GgFJpA344dkHWBxhMeQAvNCcLsAt2jbqEb0OkvM?= =?us-ascii?Q?NPi9Pw2wKkpog+qoZ+uZ6uDhnUg8GIcy2MGPJZMbMX0BP6d4HYz8c9Gf45c8?= =?us-ascii?Q?2u4sMaBbgYEQPaQxmTByQ5XcsDwBcYwAG5FENnPLZD9BQphpIixEjePf39Qi?= =?us-ascii?Q?utUyPDKzm6t80h60fFQ1TDck+gZpQW4r0wD7ymUda3Uf2Q39pocpfPhcnZFm?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2b2f45ee-f1c2-4b29-6bfd-08db7efd77e0 X-MS-Exchange-CrossTenant-AuthSource: SN6PR10MB3022.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2023 15:18:50.6968 (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: yqqnrRhwJGsaNADIut4omQ5r2dWvd6bUQZQV/XMBYwpq6MTV2a7vEcxRRyed2ZfV3JMLcDZBUvOgx+ODGVoVHQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR10MB7330 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-07_10,2023-07-06_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 malwarescore=0 mlxlogscore=999 adultscore=0 bulkscore=0 suspectscore=0 spamscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2307070141 X-Proofpoint-ORIG-GUID: 2uZKZ-EfFZ-92tlStloyR9yQcCsjS-Bc X-Proofpoint-GUID: 2uZKZ-EfFZ-92tlStloyR9yQcCsjS-Bc X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Peng Zhang [230707 06:11]: > Don't break the loop before checking the last slot. Also here check if > non-leaf nodes are missing children. > > Signed-off-by: Peng Zhang Reviewed-by: Liam R. Howlett > --- > lib/maple_tree.c | 12 ++++++++---- > 1 file changed, 8 insertions(+), 4 deletions(-) > > diff --git a/lib/maple_tree.c b/lib/maple_tree.c > index 1fe8b6a787dd..88d6373f37b0 100644 > --- a/lib/maple_tree.c > +++ b/lib/maple_tree.c > @@ -7111,11 +7111,12 @@ static void mas_validate_child_slot(struct ma_state *mas) > > for (i = 0; i < mt_slots[type]; i++) { > child = mas_slot(mas, slots, i); > - if (!pivots[i] || pivots[i] == mas->max) > - break; > > - if (!child) > - break; > + if (!child) { > + pr_err("Non-leaf node lacks child at %p[%u]\n", > + mas_mn(mas), i); > + MT_BUG_ON(mas->tree, 1); > + } > > if (mte_parent_slot(child) != i) { > pr_err("Slot error at %p[%u]: child %p has pslot %u\n", > @@ -7130,6 +7131,9 @@ static void mas_validate_child_slot(struct ma_state *mas) > mte_to_node(mas->node)); > MT_BUG_ON(mas->tree, 1); > } > + > + if (i < mt_pivots[type] && pivots[i] == mas->max) > + break; > } > } > > -- > 2.20.1 > >