Message ID | 20230518145544.1722059-16-Liam.Howlett@oracle.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 ED8E3C7EE23 for <linux-mm@archiver.kernel.org>; Thu, 18 May 2023 14:56:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5FAFD280008; Thu, 18 May 2023 10:56:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 53243280004; Thu, 18 May 2023 10:56:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 35D90280008; Thu, 18 May 2023 10:56:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 23843280004 for <linux-mm@kvack.org>; Thu, 18 May 2023 10:56:48 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 048FB1C6D0E for <linux-mm@kvack.org>; Thu, 18 May 2023 14:56:47 +0000 (UTC) X-FDA: 80803677696.28.D153B59 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf26.hostedemail.com (Postfix) with ESMTP id 8D7F6140014 for <linux-mm@kvack.org>; Thu, 18 May 2023 14:56:43 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=UTPS2Nug; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=ltpZv+K8; spf=pass (imf26.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1684421803; 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:in-reply-to:references:references:dkim-signature; bh=4MZtDw4J06RcQX0cknN/oceBJwsIK35YZxd7Ng4DHGc=; b=h4adkO0v6fOjwT5ATmR8Ri8EVzkKDGCXgORDoCZ7WTy7rYEPe+XfyPHznvjasPyKM64iyI BHt7KERRDc7WjDNZHas4AJueV/mSFtwR89jSeLaY3qIYTVbuQl6swZ9GdrGSlj2UUj0sKT qmBlH873BJAOunVXss9fWcptZ0yf5BM= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1684421803; a=rsa-sha256; cv=pass; b=Pud0Vd7EpoBSMDshegZQptmIMx6vZ+Vi+/xsDUPasKOB4lgpZcNh52EyM5gk51IZ6Yje9s vdXJ4ySg1ZNTPS/uNlEY0c1pmfsqQGmUdn7GdhpkTE/CNLMtrSxwts5Pk/mFd0N128MR54 WFkU4aLsy+RkNasGV2qKKgmG4U/+84o= ARC-Authentication-Results: i=2; imf26.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=UTPS2Nug; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=ltpZv+K8; spf=pass (imf26.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34I6Imq7012468; Thu, 18 May 2023 14:56:28 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=4MZtDw4J06RcQX0cknN/oceBJwsIK35YZxd7Ng4DHGc=; b=UTPS2Nug2EG4ACSLkTFNvodooAe8r15AhwAV/HfeM4h9WbvIk9sAIqSWDmB8bzgIuOrd nx4Gjt9hRr5Bu/u/rbmUEJDE9XjgjhOAFKiNjEhbr+KSp5w4PM/6X5k79mHcemImmIMR 5af738nkhZCDBh05Dj/RXYCZi/bD9I0QvJQd7pzXXVYr91byP73DV6q74wtoJYIbphSh NMpUxRP2sjwMJ5IpWzQ6pDBqv7/1AZkpusJ0jRMoOt9jk/w40HOgvin3yaE/+VuPLktD BFL7taiCBeQ3gXXIL4R8CIDEqWkS4eDRnJezOIU7j+BAVze7Wk6VdpISlprrReJhRHr9 Qw== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3qj2kdrgxt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 18 May 2023 14:56:28 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 34IEu7OT040086; Thu, 18 May 2023 14:56:27 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2104.outbound.protection.outlook.com [104.47.70.104]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3qj106mpsn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 18 May 2023 14:56:27 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D6ji0btn6nba4r2FoksNEv03LqUmjTyzh+mesX7yIQS4RheQV1zqls5tUuyw75A8yjT+l0FStzc5kIAn6jQsmG1nBWs8+lZoyKynXLUBcAft/H+w1VaKXLtNCvUEYLvym944iGMgiOc2xQjplhwITXmW3HNzT0tA+yEcdf690LMIZcXf+T6m0EwIETxtdnUyWasBMMCCx04udpQqEBlkC2tr5uZ33MrmxuPPbyEM/VZnYSOaOGuCeL2XCLzwL1k8wmP0+ihCwFbzf3yHMcgOyyQTHgTpD+z8zYYUxWZksJ1ODe/HrDKF5p+VBFdLwy9y0VGfVYHGQ+2P6wiydsPtMw== 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=4MZtDw4J06RcQX0cknN/oceBJwsIK35YZxd7Ng4DHGc=; b=DojWTmu1jukOhwfZWhArcPjKfYZrpx0XP5qg+JC4AE6GdHsh57Mqd5PCicsPvrZPCETlCVQBYtHw7ehuYJ+VBdPd7s+OcX9/0mctJ1HWO+0IpFG4cXyzRyjdqnrxU24MvXNrdI/OQ4xjYTCYlPGX2WcQoH5088L1Zcv4o97b/jI2X/eOavEnDEod8Q2WAbX0xfSbSf36otIb6qEJrAjJ+pEjJp9tk2zEy8XdTnvLdnwOK/Gj9dBsjGn4FNHHNdZxK6t+EFaGm4U92tQdbabmFh/92dxt9IB21uA3FAGPQ2A/LtvZyM7MzVJQDGbp6GfGNqzSZfAswwLeTOzHme+IfA== 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=4MZtDw4J06RcQX0cknN/oceBJwsIK35YZxd7Ng4DHGc=; b=ltpZv+K8nTHe/OTBMJD1TnXVgeFaBOrTb64lX885dnPfglFCV5J7sC9Bytv+hmbJQKee1cpd7n4XceM0l2wPFdKmXlg4QVn1KoZm9wEN8kHA+qfQIEjnrVdck3Yum/n9QQZgUWQLFXgttaBXIh+3uueLXAyrODoBwGtfXvJEPgk= Received: from SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) by DM6PR10MB4347.namprd10.prod.outlook.com (2603:10b6:5:211::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.19; Thu, 18 May 2023 14:56:24 +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.6411.017; Thu, 18 May 2023 14:56:24 +0000 From: "Liam R. Howlett" <Liam.Howlett@oracle.com> To: Andrew Morton <akpm@linux-foundation.org> Cc: maple-tree@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, "Liam R. Howlett" <Liam.Howlett@oracle.com>, Peng Zhang <zhangpeng.00@bytedance.com> Subject: [PATCH v4 15/35] maple_tree: Return error on mte_pivots() out of range Date: Thu, 18 May 2023 10:55:24 -0400 Message-Id: <20230518145544.1722059-16-Liam.Howlett@oracle.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230518145544.1722059-1-Liam.Howlett@oracle.com> References: <20230518145544.1722059-1-Liam.Howlett@oracle.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: YT4PR01CA0110.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:d7::6) To SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN6PR10MB3022:EE_|DM6PR10MB4347:EE_ X-MS-Office365-Filtering-Correlation-Id: 0e490de1-120a-4e1f-41e7-08db57b00cf5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HK08ziRtqxRwF91OAShqgIea22V+zaE1YdBdpF38+9CYmhmWb5DUGTLFSk0Dgw/Xvc3vpYkKlCkm0cboHSkuH4zFERo1naGFzdOsLavt8DnPLochgdW3LE0lQ1ibF4By3/YiLdBbzoQJmtHdr9KfhRsdIreRIwzvbCQ9qW/P6KuomwffyA7hHwu0lWfcB+FFkd6IOT10zZT8Rvw0riUsgVTsaC4GvxIswUyANuoYVmbg0COzYXUmmlU2NFDqMIGdDlGssjofoITpn7q88/bCeU0RM3jOpwXnfluaNNW/DiKBH6hV278FSWSXKohR4v5wC/AOaEVv58Sa03AZN17/ftDlxCwU3DaApYMPnkd/sAcaVfzhAOdi+owEZcFezAoguuwb6OW8JfTINouf5NONPVcZ9mSttKjsZTXVGUYb4rpJbhrwZo/5QdWiAM8G/6LsI1/yiLXvvvdwecr/dDYY4mqXKGebDcbh91vnLhKYD+m5WtOnA3kF6qhgiadD5k87fDAo3vz/Tf2RmzoW3fKcIWwVgchUQ2CbNvVkBGZsGL6PWy7n0SnxISQkpD/mmgCG 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)(39860400002)(376002)(366004)(136003)(346002)(396003)(451199021)(86362001)(2616005)(4326008)(26005)(6506007)(6512007)(1076003)(6486002)(6916009)(66556008)(66476007)(66946007)(316002)(38100700002)(36756003)(186003)(478600001)(8936002)(8676002)(54906003)(2906002)(41300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0iD3q1VAP3eqGbFsXyf1ekAJwi0SIuVjS8Oea4DHMt982a3i8J5MolhxPxa44+HRRwv3LX2CKBCt2CSMZ/JXn5cs7a50tx991Mt0n7CgcWMGe5E6rHW+5d1RWOeEHA0R9TlB9njo1mNGkPsfkiVCjrGXX49aLSSod/xLG5pJuDbomAIYpbKRhHW8wkg4gxaXvzSIwO/OeHV6jx99gCia/6Qzh/2XuIT2fjQzkFn7cRJGaDMTCKWTL42njSKc62Y/Bck17ri8Gc8i90tEIgJZApl02FH7nyIZuV5uh/w4280I0ZQS8CZhy2efFpZ48rcYfOoCTSYyNB5ripZR+lgI5Xjh2FdcDcXjFHmBQq8BAALjAUIzY4J4gGIUTMsT1nk9kFmwCJd9dt0L6vIXbonfCb9oK+keAyrhQuBnK3NTu9B98xLNA4QvOdmRGyyDm4yLg1yPoGBGR+2R0uQP+I0WPQzLuAnJiUqFUZ9yzABdvDLtOrUmabaP1SpyDRMfMyjAa8u/QM2izYq7dtH6fmsj3Ha9RoCMLNQpH2a0RVknLOBqjkPLA0rRi6inZPEITIcUD9D/oc9yVo4d6yxpgqlVPL/GWSi X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0e490de1-120a-4e1f-41e7-08db57b00cf5 X-MS-Exchange-CrossTenant-AuthSource: SN6PR10MB3022.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 May 2023 14:56:24.7288 (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: 8BuU7IjxRUEzZ0Vk9JUDPnyWEFwgps2aXefEkPcMBZr2rgA0vsQ2FVNteWkcmg4G+JcmTDX5jcJgwP9rjCWSdg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR10MB4347 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-05-18_11,2023-05-17_02,2023-02-09_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 adultscore=0 bulkscore=0 mlxscore=0 phishscore=0 malwarescore=0 spamscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305180120 X-Proofpoint-GUID: v33UtgKjWn_jLqCX8-aT7Wi3ERorXtG4 X-Proofpoint-ORIG-GUID: v33UtgKjWn_jLqCX8-aT7Wi3ERorXtG4 X-Rspamd-Queue-Id: 8D7F6140014 X-Stat-Signature: fror8ix8sywqjsfdrxkw4fw38hdxei9j X-Rspam-User: X-Rspamd-Server: rspam09 X-HE-Tag: 1684421803-151659 X-HE-Meta: U2FsdGVkX19R8d3K1xQB9Sbdf0M1iAqmA8ZYEHYkaWE4r4R4S7BRkNCANNwvn/hDmWdu00VckSb1Et/bbn6ZePXlkmwuNmBdUFYr0kv06ZIzxDwuY+G8zbublOj5ciZXtc9CgYqGRMoeVcIOYZ2Bj0pr24qdY1nevLygHkulifkznegVvuMwZtUj867Pr2n3I1CvP5pt0MFOUCSa/rzC0Oi2m8gwuS7kIlwBy8MluSrL/lot+jJQ4aggGP3vjar4w4hvv0IJw5a0OSPZfYyCbn4eRIg6dSLiaz2Jhq3qn4lv1lo/8o2V1EIaXjcZ7AzoR98nLNvnDIB/bqvZTvPOrRpPvyxHFSU+6Bzp6GJhTXMrimjhn4YQLBgjvKjOblmL3WZAPxTgSo3r8JQKqDl9BQLTT0/06Z3HqsOyPD8HHOVyofXHCNM4fCQeAcnE1gYnHoZRrLrOIfDCHS7bsnFPTmlzG9K7IiANwuDaggB8Uyzrb1Twx7aW3VXi0FcYU/Mn+Ka0sdAv2733EJDHWZo4Wy52BVk9LPQBAacyBDP8GlvmgVhQPp+cWkOz6x4VHSnaqjwjpTAiceRrkYesNOdlXB89Q+qRGrkLU/ixpW47qfzeFXKEpPdWKTOZNYG4nPrtiKvLzycT2/OLXfaFC43zhD0lf7vQcezE8hRoM/sPLLSS9iLRh/3RsglzZBphn2hb6qvU+QdMLQDo5Lm/tUJBZdiM+TMpal5uwrs/R+Yc1bZ/+gaNioRm5jDR3FYWuYyCN3DXMJkt4T8P2lqSsPwXE6MDN6p5dl25MOPn92ip82/dJ2gPdruRPx9UyFcC2PBsjr5Pz0LyosHgmc+Zt5P7DM71EpVGh7Ne3e6OyjfIfp6wfMeHcbEmSYDwUEqsq9AHW4J5AqXt4yNroqMPpaZlqICGYwcu1uArMyhsjGUtjT6wT0CFCjOXoq53jQB6577PZ4O9STy+3q2lGQ5xyDc dOnTWPOC /jQpvGMeH1IZWYh65ZNv8kPLiNLwP1gEEKxMdUb29tHgQQCFgjMTxzWIn2EmbFdpLvFailBaX2UYur8pcCfE6dfwkAEw6SQ7x6jOW3couLBCJ2qTjVUMpJkPYMv8sNduntc+lg6TG4R8hmFXlbicW1bPHG4OTpW8CxmqlPz25kF56Dh7dVHvHkO7ay98Itm0UzM81rYIv24pkF4PFY6m4w4Bownb9lnopX5lvdBm2BW6CKJGK2QEz6n2fsDMAfOoHOru8kzLLwEAQJmSuzia3PJMwQipT2+pxX4L5JkVMlv2inyoL8xFnbJms3yVZsDsxN5XhD2BI/T4Zy3vCegxxvmpzKu+PAHd/wSQizclVeu9cKDdagzPJtimhVJVFiIN5fqC556gnM+VPdYj6z4nGHNahvXiAuYDKJMOeALWAPYVHp6MucqH5t+cZkh2IkY4n3xoUep7mgq/nRBkxpmN/kJhsDKrzMIHtS3dNx8V50Jk+zYA= 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: <linux-mm.kvack.org> |
Series |
Maple tree mas_{next,prev}_range() and cleanup
|
expand
|
diff --git a/lib/maple_tree.c b/lib/maple_tree.c index d7809a7000c5..9f3784f4a5b7 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -663,22 +663,22 @@ static inline unsigned long *ma_gaps(struct maple_node *node, } /* - * mte_pivot() - Get the pivot at @piv of the maple encoded node. - * @mn: The maple encoded node. + * mas_pivot() - Get the pivot at @piv of the maple encoded node. + * @mas: The maple state. * @piv: The pivot. * * Return: the pivot at @piv of @mn. */ -static inline unsigned long mte_pivot(const struct maple_enode *mn, - unsigned char piv) +static inline unsigned long mas_pivot(struct ma_state *mas, unsigned char piv) { - struct maple_node *node = mte_to_node(mn); - enum maple_type type = mte_node_type(mn); + struct maple_node *node = mas_mn(mas); + enum maple_type type = mte_node_type(mas->node); - if (piv >= mt_pivots[type]) { - WARN_ON(1); + if (MAS_WARN_ON(mas, piv >= mt_pivots[type])) { + mas_set_err(mas, -EIO); return 0; } + switch (type) { case maple_arange_64: return node->ma64.pivot[piv]; @@ -5399,8 +5399,8 @@ static inline int mas_alloc(struct ma_state *mas, void *entry, return xa_err(mas->node); if (!mas->index) - return mte_pivot(mas->node, 0); - return mte_pivot(mas->node, 1); + return mas_pivot(mas, 0); + return mas_pivot(mas, 1); } /* Must be walking a tree. */ @@ -5417,7 +5417,10 @@ static inline int mas_alloc(struct ma_state *mas, void *entry, */ min = mas->min; if (mas->offset) - min = mte_pivot(mas->node, mas->offset - 1) + 1; + min = mas_pivot(mas, mas->offset - 1) + 1; + + if (mas_is_err(mas)) + return xa_err(mas->node); if (mas->index < min) mas->index = min;