Message ID | 20230105191517.3099082-4-Liam.Howlett@oracle.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp457891wrt; Thu, 5 Jan 2023 11:17:35 -0800 (PST) X-Google-Smtp-Source: AMrXdXtbVJksiKY7pdyncJkE9PHUytWlr2lzdcuWlmrrH6X0oiN2D7H2of11nLQwXX3h6oS9EU7a X-Received: by 2002:a17:903:2149:b0:191:45e2:910e with SMTP id s9-20020a170903214900b0019145e2910emr50018707ple.4.1672946255303; Thu, 05 Jan 2023 11:17:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1672946255; cv=pass; d=google.com; s=arc-20160816; b=qUqPj1seP7OKg3xG3U34s0P8RsmfFkxu7wb4wWVckk1a1trs6KWhGXwZ2SLs8Yp9/A pYI4cJt1kzmGWI7TEFsr1idcPWqem2N5ll1hJ4WbIElXSc5f9VmLXvyovQnoX/eNX8Ep v8gahoCnXgDnWj9BrOxrxeMpcQnaTtjx6JUGedq9mkwWLlMk8JmeIHSBQCVHQx76QWxY qpGF+oR6UEQLRd/3oZq57jzkKgODYf4GT44RR8/jszL8Sk86VCdJ4jV+LzlUfvaTxhOe lsdf3bZAAaRmJEMIwUlklBDzoatGLw9xW2oezL9ccdbvF4OZlKt6LQujhRrIMEDMy0ky MYpA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature :dkim-signature; bh=AtQwHozD7Mms2T+KB+fR41DI5ZLtsKdl62R8KThpOeQ=; b=Kbatt2kicqJFgQbqPnES2jsF2A5g8JEtDqHwNYlK4Ik+qm9uczuEvxWd0QIbbMuNMC 3B1pZVY2bSzkkwpH5satV+EsQ1+rkWfnjcvrYy0GTyEg0cVOk+BBcBIIm/wz976+gn0M O00FtRUXbeF8dYcnmg7KEIz5lWK2UzlFz/fFsKsb0XI6nHm70rqGRBaA7w4NSqlsD0PO n95Jd7pkJlC5U/fOCj8kXkKgPkWxalqeG5bCxtO2Vx9B5eb7gzw/25WLMNo+4O9r5I3g xAcKe597TXn0hmX86iOCiT0s7+hTFIYraiziSl8o3772akPogc3nfg+bFBHJtmRqfTsz nTQA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2022-7-12 header.b=jmKsWUNa; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=FCtPmTdW; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m17-20020a170902f65100b00189697e2433si8236919plg.537.2023.01.05.11.17.22; Thu, 05 Jan 2023 11:17:35 -0800 (PST) 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-2022-7-12 header.b=jmKsWUNa; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=FCtPmTdW; 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 S235469AbjAETQV (ORCPT <rfc822;tmhikaru@gmail.com> + 99 others); Thu, 5 Jan 2023 14:16:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235345AbjAETQI (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 5 Jan 2023 14:16:08 -0500 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 592D68FCE for <linux-kernel@vger.kernel.org>; Thu, 5 Jan 2023 11:16:06 -0800 (PST) Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 305ITwAl029120; Thu, 5 Jan 2023 19:15:56 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2022-7-12; bh=AtQwHozD7Mms2T+KB+fR41DI5ZLtsKdl62R8KThpOeQ=; b=jmKsWUNa6o5cycWiWSFBw8D4gXy16xRbZefHKWSzKReOPri4sTgoOyOBO69NaiUkSpdU KXXZm0QEY5XMo8Q0NIMh0WK2DMJIO2TvQ3UCAWrnGq4ZJq8A5Ny8idmvRPAf9lSimkcJ WNTDjDjYLv2XkIN7oSXFfcRP3Fj5eQAM72I2g/sX3wJYLsyDVZoVaeCg8hmTcZZSFaBL h5vVET9V9mTbEC81/Da5qxwBtRL8sPI7s7uH6Aytk0nKU/7npQJaJeKOCHpd90ikl87i PTSOaeItBBPO+GchgFC//l6MagRZwBLUfQlt0wBrM1Hi1woadC0TfzjMq4GjGWpBFG4v /w== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3mtc0asrk9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 05 Jan 2023 19:15:55 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 305I0WPF023380; Thu, 5 Jan 2023 19:15:55 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2171.outbound.protection.outlook.com [104.47.59.171]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3mwept6kx6-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 05 Jan 2023 19:15:55 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dxtPtkWl1e+YCaxnRoxg1igqX6ERNsT2KhJlbjIm6YnEAgGpjJxCfUH5puluBdMNcKGgpp0q0CFnN/dCgG+LhJXd24KQPHi7DIjnWaNiTwoZ0feXABYDMawKlggaAX+dm8j4gBzjg/YNNjoBf+dprA3OszZLPBp5i6Imb7cXA3gqlwrvwHOiUP2dodwyj7WBPHdHnSpIfN8SxC0ip2g+H5M9QzLr1Vd6z8ngIvSjavOZFRTX4MIMJJqypdXuM9rne+COXGmxwMYREuE2eZ+yHGrCAJ/fja7gZNIxrLEYxG/eVb8cMLLyje6BsD6PUoPe+6H4uSRd7DR2DZzFFn+23Q== 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=AtQwHozD7Mms2T+KB+fR41DI5ZLtsKdl62R8KThpOeQ=; b=XQ15/a6mxNYQaB4QWgFHi4VYXgCmHM3L4GNmtIkGsDsVbVqtXoA4IF8W2lfizz2xpvQG4uLogfof0r/uzUYu04wmqtRXP5AkCVRAKGvUHzgRJYtm67U3feg3X/LpNsz5dpff/m49EH/zU5cXLqC2ZqiTR18t4ygq0jQ/c9g87baKvJD7/PWp3FwvSnH+pEi6EQi7w0z4iR3mqPiebRgwGwhr6ePWiGymd+zmBG44WYOJAJIjCqQtgy+otYNi7U8K55CdkhLTrD3vBpEVe0zOnCZ5pqgpwQZ5SClvl6GbHTs7TdiXbWUuGTZPgGy7KbMlMIOUT747YbJz2ugbh+bvsw== 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=AtQwHozD7Mms2T+KB+fR41DI5ZLtsKdl62R8KThpOeQ=; b=FCtPmTdWX2g7KI0/XSXusspU8Ae+hsNWWSLkK8SSmyi+IOLDKfkIE2Spywv+IPheTG06d9o3PbrlcolxIJPBNOVm/7ywONplJAC3c2eNLddgZxgLnbDwDnkXv4DhOmi8pCa5SIGrXtnGuOInttQp+0Mru7j/GKaFL8qRNWdlK48= Received: from SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) by DS7PR10MB5231.namprd10.prod.outlook.com (2603:10b6:5:3b1::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5944.19; Thu, 5 Jan 2023 19:15:53 +0000 Received: from SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::a02:2ac8:ee3e:682]) by SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::a02:2ac8:ee3e:682%4]) with mapi id 15.20.5944.019; Thu, 5 Jan 2023 19:15:53 +0000 From: Liam Howlett <liam.howlett@oracle.com> To: "maple-tree@lists.infradead.org" <maple-tree@lists.infradead.org>, "linux-mm@kvack.org" <linux-mm@kvack.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, Andrew Morton <akpm@linux-foundation.org> CC: Liam Howlett <liam.howlett@oracle.com>, Liam Howlett <liam.howlett@oracle.com> Subject: [PATCH v2 03/44] maple_tree: Reduce user error potential Thread-Topic: [PATCH v2 03/44] maple_tree: Reduce user error potential Thread-Index: AQHZIToh4iSN6+fCUkqyQ0xEo8BZ1Q== Date: Thu, 5 Jan 2023 19:15:53 +0000 Message-ID: <20230105191517.3099082-4-Liam.Howlett@oracle.com> References: <20230105191517.3099082-1-Liam.Howlett@oracle.com> In-Reply-To: <20230105191517.3099082-1-Liam.Howlett@oracle.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.35.1 x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SN6PR10MB3022:EE_|DS7PR10MB5231:EE_ x-ms-office365-filtering-correlation-id: 7ba49b5f-ab70-4ca4-b7f9-08daef5143d7 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: OH0ADRyucPyvn7zwVFWLmjhLb6Wa9WbPRyyJ2+mPKpXoEVcBqKH4+TTyO8gruJYOSpws1ZV+GvdpTQABytsujIGQE/XiJ9pN+12cTFSPXF1JS2xPXht9Rmuv9MvbGC9Kjcx1eIXPfvceaSy4CtA0+DWSxogERuUqS2L1pyhdlTHLHN/TscmfBzix5Cfo23qtKQcBzNGHmbfXVbkHPbHefqzlx0S3B7AjM2mfXrluhFmyal85NH2JVNOeqqwgb2Z8oX4E5I2dKcTR+BnQ/0VuOfqsg5/3Xplrg+9ms+IuSQaLPhCWSW/m+Em4CJINSyfjo4F4+leriTR4usdXzyMbfwlDhNBwgRUo0lmWhrD37o32KcC0v9ZxnNqswHi7c+eyOpyBVGzu8BGvm5bJxZIdyMJTaOMqPuhC08TNjWqtJH5Yh9F7XgM4irIl3JTpHd4I3dDNf5E+2qk2fsyJHeUfWF+CP+By7GpF4tvjWRWH1bTrsKzpVOMFw2zkzdOXbrFS2x51b2dU1Oq4bBYgrBqah8sjGoI69G+TZQ0HNadheZjt+EvDyAAogAhUVuzJpKO+PTAaTQxGjEpxTePnXYlaVDeeKtye4hWa9xr9upmj74aXMxBdarztB1caONR3rXTAqwMRe7NYdYhY9Lcph/dgNMCdSvL1l0OfiY9aQAQeIMw+zfR8glAJUd2hDzWYMRovtazzZ3O0yK3fIb+rmRc3NQ== 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:(13230022)(396003)(366004)(39860400002)(136003)(346002)(376002)(451199015)(110136005)(316002)(54906003)(6486002)(186003)(26005)(71200400001)(107886003)(91956017)(64756008)(66446008)(2616005)(6506007)(4326008)(66476007)(76116006)(478600001)(41300700001)(44832011)(8936002)(83380400001)(5660300002)(66556008)(66946007)(6512007)(2906002)(8676002)(38100700002)(1076003)(122000001)(38070700005)(86362001)(36756003);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?gZSuhwrIiZmcQiA4mGSUBRj?= =?iso-8859-1?q?aOkTf9/9EftaXsqLxMyySJ93CFdYSj2IAuC0EwumcQe1YA/tALOovzdNRKHV?= =?iso-8859-1?q?mrVEJXMxi8LTDUJNrjCyuIrPpvzHCNhHTL9Z2V/FBVf8jdsnCpFKXABhQCKc?= =?iso-8859-1?q?FRduZZhxo0OSMBOoXZSRa6JGJekEhxHsdJpgTTKIqD3j0Xs3GQAAE//nqULf?= =?iso-8859-1?q?/N15eED2SM2pdlOPJ0gK/lhCqPizAtPJIHImc4IrKq6BpZoBkjNGzckjqrPv?= =?iso-8859-1?q?IWsfP28iE6j8SFiRr3ZQfJLYx8tS19waSqpBVY4s+aRfttfiSEjR6w5zvq67?= =?iso-8859-1?q?RxxCyc3LWJ1MzXSMtAdR0vm5Lny5eAwJRDZkg5P9IXAGWA+TfIYAP6mfuHfg?= =?iso-8859-1?q?NeQUYqhc1hAcodOOgRVhy0v0OCYdgyMplXjKaRwEAMhgeI65Iqlh6RqevQdW?= =?iso-8859-1?q?F8wcrw0L7k5vcg7O1cxDwUsE7xV0qvjtFr8PgIVg19w6pRp5yewi4WL9txdi?= =?iso-8859-1?q?dI8biw3TIhibXFx8Kn6l2DOMP7YwAkqlMYGcgUdvMMOREt5Zpkc0iB17BCFg?= =?iso-8859-1?q?pdExiE0jDY5+sln4JOlsaHnXsrY973YzzNC4BDwFW9xCK7xZMissk7/YQmP3?= =?iso-8859-1?q?MdJy/CyvKpksc26ERLfr11I1nRnVjVniEG/KHSytkSN4NKEtNQA/3mTlPsUz?= =?iso-8859-1?q?NNWGHNS+4EIOFfMdXbYerYRZ2c7SnRb+PeqDIz6lQybRUQCZjvXMwxhgs6wK?= =?iso-8859-1?q?IhFtB7bk176MWuGqPcs1k1r9Dc8UiM798OVV1Pb3GYyQKrNbCaK+Af0poGbH?= =?iso-8859-1?q?4Dpg7d9K0UhD+YAwD9ngClh+4Xfoe2qYNT+9G3i0GfZC5Lja2pKtXP3lzPS5?= =?iso-8859-1?q?X9J4nEV8/wRjUaDEdz8ip3CNEyPQfUqdGJNEXgcPtzB6uBDTpGMLqFfvnFKH?= =?iso-8859-1?q?BoAasR4TYWnzzbrSpiXnp+Ffw4jwzDt13Wrk3IP0OvY+jtNfcjv6RDRwqfjm?= =?iso-8859-1?q?gOpd+lTLkQVhAaSELiDh+ebBxXJoYkDSAyc6LgVM3a+xSrNch8uH9PKj0LEF?= =?iso-8859-1?q?064s5CzTzJ3CpFH/FbWoqiXIUAjrekF6XLFsjzwGfEi5oPK1PJwlvv34X6ub?= =?iso-8859-1?q?CgQb9y5ztvpGCSIIanFxxikDwoVjvSsBxhkpci7Iy4zybegVHJZFJeKni1Tr?= =?iso-8859-1?q?b5LDcKJh5ssHsAq+092QlP2k+v6m4nVmqVHkfB9w8c3VVA9gwGXQSSdIDLxU?= =?iso-8859-1?q?PD6zm223yNDF3XXMBG1PpzT6PlULW0151bukaP5Dhgmqb1SqFjRdmDPmCPCc?= =?iso-8859-1?q?/U5/TrLUA42TJKUf0pZsm+3lzhlwhwMSag8SEUoent7M3DVILkxxE8BkQ56f?= =?iso-8859-1?q?+5otzUYoPydZODAc6SbDtgpmJ7TXJv13ocu0hUV9cq3aitnjto2lTqXpFky0?= =?iso-8859-1?q?rwHDPfE+3ToYFvea5hlDsh0HZX4hK+ID6DvT5k50q9MZxJcPRlJxLzNqJEwO?= =?iso-8859-1?q?uU7FHQgoNvl4W2qxh0ibD+nCV9MuobutvQ71S4/KXmsfY7nJDX3mgZUzkjKO?= =?iso-8859-1?q?vEsOebEFxHGMhqn4ybeMoSgqn6x1L2AMkxbxyW/BNuRlqC8UXOfG9A2BeRyq?= =?iso-8859-1?q?qT41PTpZZKgfzyMJCHMjRfJa34nWANmH6gj+nQg=3D=3D?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: /9oUu1drYhjr0NX0NgqqSXb+23UCVvf/YrI3uNOySma5FY2z2vQvdmqS6jAeXyfsc825PQVgAyShOH9WwxNM096Cpwcd0XrVbibt3D1vz4ZdKrGyDPYE1HiPmOyTeDZ5JxtukzxQ2AJWCMFzoJHHef+5BnR9fhLlZ+YFSJZInTSLV2JgzcfoTwK470roXx2CjvSunNfDgtYWc/kb1/bBn0CAVmCOjaCuq+eMwNrFIToCjEZYFdsbcFZFh4NZiFRntnwV4kTwiDIGPm+UITo7ML0DllJAXv77UQuMqNk4t8SPPCI3XKoD3DLsLwPI0MQPQrOUnwq2R0kZJxTxDZyQpXtwwi71g7ZUmVlWMDTjgao4HSHTyLV5k+ehr1roKyolNUHmazV65I+c/Q2i3WRgYCa/ajP6lGE2zjDymKmml1IIGbCR+bifmcnJ0MzrBfRK4xDsBrqXSvkFCN14qZu0tYqYAcEJo66HVvm86GecXCH+/3yAfKAQhYNo+cajzwvAL2v7jdX983O6pfdw7j+RWq2Q7JozTLgF0t9dqcFHwise9iwqEfM7H5Y56o+Q2djdGpYPytuZslPuo7IjXKvNGSfVOEzT3IOBsemDCPXhXt557Q9jSHptz/UxqMcs8Kuz/mVVhBTaAcQLPMBlp/VU0KnrjBYDI2FCBWtcdyUR0YGljY/IMszGmceASbA2sK8dsMF2Euv3KQdqMRZUiPyhpdgrfwelg4ZwnrTHLE9UkSkarKA+EWES3je55s4LSaSEmxY/bXlhMJLZKOgCaLYuKyH1iUTXnkg1lE3Aw87kuzk36dL202tCuuO9VhRKTcNc/JxiOaYjT966lDNuUeLtCYiPK9wOltAOCIqsZ751bPBumRhdjtsiz6LZ0aYhXeVNYhCONMqLOq0fvTcECAPsCg== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN6PR10MB3022.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7ba49b5f-ab70-4ca4-b7f9-08daef5143d7 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Jan 2023 19:15:53.2509 (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: bW2SRiH28OT7l0bRJOmiBTwR4DNMmBNx/+vnz2LVQo+SpwVIhWGiWurH0ITzfS9XZleoy7Mj1UhZdmi0ia2gkw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR10MB5231 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2023-01-05_10,2023-01-05_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 suspectscore=0 mlxlogscore=999 spamscore=0 bulkscore=0 phishscore=0 mlxscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301050152 X-Proofpoint-GUID: ddzLqBHdUSmzWE0SykCq2d-b65cmCCGa X-Proofpoint-ORIG-GUID: ddzLqBHdUSmzWE0SykCq2d-b65cmCCGa 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_H2,SPF_HELO_NONE,SPF_NONE 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754211292525277882?= X-GMAIL-MSGID: =?utf-8?q?1754211292525277882?= |
Series |
VMA tree type safety and remove __vma_adjust()
|
|
Commit Message
Liam R. Howlett
Jan. 5, 2023, 7:15 p.m. UTC
From: "Liam R. Howlett" <Liam.Howlett@Oracle.com> When iterating, a user may operate on the tree and cause the maple state to be altered and left in an unintuitive state. Detect this scenario and correct it by setting to the limit and invalidating the state. Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com> --- lib/maple_tree.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/lib/maple_tree.c b/lib/maple_tree.c index f3c5ad9ff57f..14cff87cf058 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -4742,6 +4742,11 @@ static inline void *mas_next_entry(struct ma_state *mas, unsigned long limit) unsigned long last; enum maple_type mt; + if (mas->index > limit) { + mas->index = mas->last = limit; + mas_pause(mas); + return NULL; + } last = mas->last; retry: offset = mas->offset; @@ -4848,6 +4853,11 @@ static inline void *mas_prev_entry(struct ma_state *mas, unsigned long min) { void *entry; + if (mas->index < min) { + mas->index = mas->last = min; + mas_pause(mas); + return NULL; + } retry: while (likely(!mas_is_none(mas))) { entry = mas_prev_nentry(mas, min, mas->index);