From patchwork Wed Jun 26 16:06:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Liam R. Howlett" X-Patchwork-Id: 13713160 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 F33ABC30658 for ; Wed, 26 Jun 2024 16:06:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 32FBF6B008A; Wed, 26 Jun 2024 12:06:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3069D6B0092; Wed, 26 Jun 2024 12:06:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EFA5F6B0095; Wed, 26 Jun 2024 12:06:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id CBEB46B008A for ; Wed, 26 Jun 2024 12:06:47 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 52800A1434 for ; Wed, 26 Jun 2024 16:06:47 +0000 (UTC) X-FDA: 82273518054.01.F3146F4 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf19.hostedemail.com (Postfix) with ESMTP id 273551A0025 for ; Wed, 26 Jun 2024 16:06:43 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=fpsS1Rak; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=nnKJ585k; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf19.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=reject) header.from=oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1719417989; 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=ectDZcZBz082gt4aoE3SA5jU5Dbmmj7TtKzM2HttSck=; b=Z/U2axu4LUNlOGG6419t1qdwAaKB9D3yGB1f92dsRPMmUmKjjLh7SwVu38tCsQ/hq04Bvw oDQG6u7FhxQCzTbmdYJSRsuR7NgCfptq8E2XEexpgR+3y9+AQrjUkKjAfgvboVJyAquTUF ru3FwBav9aRGYVAzCEQonaDcigJZ720= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1719417989; a=rsa-sha256; cv=pass; b=f3DaBu/Db6aqq3JY4yco50b0NLdbXdiBx9VCXUuJeNHXDYtw+Mur+wUw5M2jYu3jYYX8xx 5Nagndx77DD+LF1sjBzoJOARb0mm+pvt4RWEWLTn7tomc2u5PG9zHB3zKkgmTsh3AEPHxK iGLX16RePCdAB31MVpZ5qLqvz3Alofg= ARC-Authentication-Results: i=2; imf19.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=fpsS1Rak; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=nnKJ585k; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf19.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=reject) header.from=oracle.com Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 45QEtWUt026697; Wed, 26 Jun 2024 16:06:42 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h= from:to:cc:subject:date:message-id:content-transfer-encoding :content-type:mime-version; s=corp-2023-11-20; bh=ectDZcZBz082gt 4aoE3SA5jU5Dbmmj7TtKzM2HttSck=; b=fpsS1RakfIqAXWkyzlkgB6bM4C9MPT POP3S35NOlAJnxqtwQCQCiXnaelb4plzrOHZSHmXDzQUhXHABTqqN2VNn3vu1B5w Ze24N/ksFNWHUlTdayEH8+WXOwe6FcYswZVVck/7UIeElE46VdREKYDf41HSvUSA 7nBENn8ybauxU0GNN8uGVnnR1LBMU3KEuTql0GfzljgV7ouu4y12GgNdBRk+F+cL oiSBvOQ2lsPbRBOYizffIseyKOeS6+SSGNTAwE/vx8uZSiJLKwSKyQtwlvWl7YLJ 5EqGRPOKISHDBwsZoQYd1OlcgNjrkiCYqsB2jVd8H6X4Mmj+KYqjvCiA== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ywn1d3hb2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 26 Jun 2024 16:06:42 +0000 (GMT) Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 45QFlvKP010721; Wed, 26 Jun 2024 16:06:40 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2100.outbound.protection.outlook.com [104.47.58.100]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3ywn2fr8my-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 26 Jun 2024 16:06:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=S/UhJjif2Cpe9l/lxnsVLkh+AuTN5D+tiloIrZK7ahc5Rj9ftna7YQbMTgODL5LJ9s8ug4HxynuA4e2m70zRTXD0MEjRYr4Hd5hXLjsBzSMguC/SJtbzW7EVeXlj/6Yfe8r2Aa4Np2c4EjjzRPcl82ADBi9kZOW+54WpC3VbOeuaoEt6+0LUKCG43L4KNN265YHfbM4b4UeunwzDtp/Kwv8bBK44slqLTRvjqTvFOsNtQRet7spT81q59pj5n154NI1wnUNwrQgzKMXg+3iyYK42MXz5/MXO7NYfzbtwIu/9RAqlc9WJmGIxnBpfV7mbhXOfhJ1ECEaCzNAs9Hqi1Q== 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=ectDZcZBz082gt4aoE3SA5jU5Dbmmj7TtKzM2HttSck=; b=Seq6UWxQLIJJucebPxeRopxsL4Lj3rMD+VLxLdlmoHZrwqc08d1bnC4L+q6Xbb2VLfC258wujasse8NqCRy3ByazmI1Hr6aAnw2JuLJit8XGjF5hisU03n6Kuv7Qr8YaZzV5aw0YpuAtIAT+iLDQSUOwz98ZniaJS21AVJc76lPYH09B/D9be6oDzWJIyQ2OfkaiBwnJSxQ+CkUBtCzJF3246CYjIKTkMMXe7Yx0g9hQxY15dhYvBBRTwGsSl1UepjaNrk6YwIFtzkYLQRA+/Ss6SyNwSiiGc7C0tOcXC+x5Ew6syUoQEFfU7SY4ASubDlQZP9mbea0zTlnI61BI5g== 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=ectDZcZBz082gt4aoE3SA5jU5Dbmmj7TtKzM2HttSck=; b=nnKJ585kjoCS6BrskY3pCCBi2SuB8WiJbvg6rZ0yJf43iY9dDpaEl9bPotR/hdBV1XwNOreBBTstiaVc8lCG4sC7NtPGetl/c5C98iEhe0pG+UPF5znNqc1zYYeNaQNj+l1t2R+QFkZy+THuAls0CwJrKGbGGBtxjkNt3ZfrocQ= Received: from DS0PR10MB7933.namprd10.prod.outlook.com (2603:10b6:8:1b8::15) by DS7PR10MB7225.namprd10.prod.outlook.com (2603:10b6:8:ea::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.30; Wed, 26 Jun 2024 16:06:36 +0000 Received: from DS0PR10MB7933.namprd10.prod.outlook.com ([fe80::2561:85b0:ae8f:9490]) by DS0PR10MB7933.namprd10.prod.outlook.com ([fe80::2561:85b0:ae8f:9490%4]) with mapi id 15.20.7698.032; Wed, 26 Jun 2024 16:06:36 +0000 From: "Liam R. Howlett" To: linux-mm@kvack.org, Andrew Morton Cc: Jiazi Li , linux-kernel@vger.kernel.org, maple-tree@lists.infradead.org, "Liam R . Howlett" Subject: [PATCH 1/2] maple_tree: fix alloc node fail issue Date: Wed, 26 Jun 2024 12:06:30 -0400 Message-ID: <20240626160631.3636515-1-Liam.Howlett@oracle.com> X-Mailer: git-send-email 2.43.0 X-ClientProxiedBy: YT4PR01CA0084.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:ff::9) To DS0PR10MB7933.namprd10.prod.outlook.com (2603:10b6:8:1b8::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR10MB7933:EE_|DS7PR10MB7225:EE_ X-MS-Office365-Filtering-Correlation-Id: b91b0498-7b54-4a23-c4a5-08dc95f9f449 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230038|366014|376012|1800799022; X-Microsoft-Antispam-Message-Info: qOyt/9rzIejFSpNKShgdbgSbJ3sie95u+1Qc9X4z3bycvgh/Y5X4T//4FXdHLsdC4RkGzTlZHqTnBthJYj/aFB2XXYiiM+ZIrmusZfarZENtuO+Lj82H1AlUdr2yJwFopeg/JXRAwf9FYROfmS/897BhPKW/daNPVmRsQqzlx7rPFZ/eb9UiNxcXc64ZP5P9I635NKBnxipCn7b/z2PbtjlZn0TKQXumWgSY9sNXs8J26NSOJy7uYtcto7OJmLODUDiAtmsPUChJ0a6nOkKVDZRk6Zri2yB6VRjQwxX6/kRHhEH1oT1eLJllUGIvWZ+Wx+HhChDhZ7G78Z7aIVafYcTHX5Ajykr+kztIp10jjI+U1G1xo86lqDjlgllSc260CY8GTTx+QtDsgDkud1dBTRRFUJ5yfStYT909EljR8eGcoi+tYVlsi/NY1rtGjeP+e67jINgld9Rj2SIkQRfgjl/fVYtD7HK4fjwZljBDJu9z8FZjr+PmFfJkQzwQk69HxFK3K+AHbVN5ytqaUU4yWGzxt2r5JUJa2/IlMHs7+QlPYy/NCUez3Y1n0JieBDsouwUOFd/m7eGjx/mPJQDa8t2taxoEFtC2rN0YUdzf/j3Ha6kYW0qUPed61c86UE7NnsFyNtvYZMmBYi70WHeIHscFqgfCpxdrshoLGNhfyQiuA9DJ5sOmuYGtAV6twRCGX+Rn+VZFun+utSNP9giy5bh6BJMxfUC4oz7dbNuB4xUDb3GCQ876ZvD6Sy59SOhr+9baKNzwTq0QBUQbv2CTkWZd5/LTupzdzlJGJ1lFGOw6ToOD2UVSq7VwcWVSZzB7TcrJf/ywkb/fx4NQK08DrY9tKQXkeZHzLg1g2V5dIxpH9v4WThkwqdme8umQNMrlQkvIw2rYHGQ0Z4sekA0X35SHZgkAfVcO7H7s5Tx1X0ltMzEVVMN7tDqy7UTGtv+f3D9ATL1aVUiBOdTAbIa6PraoH7201tI8PunAjYYWoll/EVCsFY+g2ZKmkByA+Z8MYoujCpBZGP/A1qPy/0qeXS1wXl9+Ngq9FKor8tOboVNtlRrzcipVh1JmGi5EYH3lJ4R2AB/NGczc8DL/PVKyEIe+6zTs33HEc3L0aqDCwmz5kwJovaY8VLAUD54yHo0dY2x4rWv0hTBuq/Y0VAt0wQPoHGdPBmgfxF1FO5A6BN6WbyQiIQJkijIffTY8c4YBu6L/McNV2mBZ4vltsZp9K86LcAhzc3NOuder0/+qrO4fAdgM+GzAe+GbjS0GLWhecqoXHGttHJU48ghN8RQ/DX+iazYJtbohppAC7XTak/4In+wF873xm4m5tHzYOa+7cfEr2pRv1+layVetccSpLA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS0PR10MB7933.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230038)(366014)(376012)(1800799022);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: iiH/MV0ZJwG4OeMDCqi2YdPN117MsV72SimaQBH5eGKGv9JCvHobr045e/ZOaN5SAyqViLl4oCiIJa2fpUEtoW/fnrYvdi8+F69/U+LNcLXGwPUVssCqZ+nPfsJ+bR3p2ehUg1j7VdV1UAqcckp6fqo1SbdFXbrD7yM2kLS3rZAgyN9aEcK+sS7icpRtRdVzEtR1XP6ynJT6lvCAXhO+RNAPGKLaPMFWo5eWrDLKJb6CyFZp/tUeJ5ksQdGWurNNo3BKEWRz3tAN270LcOExrL7wkpvQGw1HoFSZWj89rDKgGk30Ek3NfXe5GbQKgjzsZSu24GYkk1snt90vSIAoBnJDoIXepGuqDSVsqOCg3b3ABOr1owB7vQsMKbftY7u2t41D1L0UO/Jzn0gMmKtyPYB2Bg3ZhS++Qlqgnd0Fm8sWwdmLVelh2PO3sGv3Hmtcym+tzrNQVP04cZjfwWTsrkMRXP8OI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hKoTObhg4qw7T3nOnFAHAqnBElQ66EZpMT8oBiHEn5y7FLz8SGeqR6GnwsIA== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: QUrHudMBR4ScNzdRX82DpKh/uYtUSwS3TstZ17/UZ7Sdsegf5yKWJ2D5ZFx3SFT0Iwhf4yENYFcegUlCYWfsHjC/gvRSDTOywt31OWI10ZI/42gqztPEYfBQi5v6cPxj1Ml9pChE4w9KtU+MFW8ONO8pdchFs4ohX/CPvJqjSuW6AQrs7OhFB05aLfeUKTb9lnCjrVxJT9QwiA3bZuimZBfqRN9wU5HKIYxWguzkCnW5E8wXGSKT0SSWknpodWmUsL0daR37DHx9Yhc+ub9wlSgZhqKr40emNT0zV410p5hFKqIlbVz4DaGhpDLUkXZE1qbnskiJU3hVO2ZI0iQmtm7H8dGDY23jBnTjFje3dTOxvhXRefGj7OUT/s5i/+KgrIXG0/16hf/nkKBQIU+FcBnT1MwyGPp4D1AS/tvyMUq25B73xLco1jKE/xHCFuSCeFsCt5zsG/R4crl8F0ECnAlm/0UYGjI21IXlvavARrCKiroPPAMzA6k4hRUJBUKEAz8ovvo5fjd28/hq0H0k/nOl/VQGg/3C9QUoYzrL1uxv1MLeZgONbcSB9JOrHYdzFxNMP4W8IC1fS3rK6ZO01W0KCq6tqHjGfPPFkU/z8Jo= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: b91b0498-7b54-4a23-c4a5-08dc95f9f449 X-MS-Exchange-CrossTenant-AuthSource: DS0PR10MB7933.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jun 2024 16:06:35.9355 (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: xy/4SFwSUHdplBs9bHscrL/KRK6P7xABTtJ47+T/8fc6s/e8jNFgeXSG0oJJaGp6fesrF01qO3v9OobT2GGucA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR10MB7225 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-26_07,2024-06-25_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 malwarescore=0 spamscore=0 suspectscore=0 adultscore=0 phishscore=0 bulkscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2406180000 definitions=main-2406260118 X-Proofpoint-GUID: AjrVpalinlCQg44D7Y7FupoTixuJ6kFh X-Proofpoint-ORIG-GUID: AjrVpalinlCQg44D7Y7FupoTixuJ6kFh X-Rspamd-Queue-Id: 273551A0025 X-Stat-Signature: jpftbzzys1k865r8i6zqrfkoksqamjij X-Rspamd-Server: rspam09 X-Rspam-User: X-HE-Tag: 1719418003-619772 X-HE-Meta: U2FsdGVkX19GZPO+gU9HbCOidfnLTRV9sgQ2+dJCNlgHe5mXCkzOLCjip1tNhFPwLgfZbs48N1CH07Nf/EQaEor8k85HUZPPck23XGtidHioI+tMmh35yRoKP8iRfaPmjGbn2PGV3j91tekfV80zcgQSkeQBC/cGoA2j222rRJbT9Bx00rOP6adM0+ZOC5hW3jGb0hPGa9n7fUxzTnHcx0BnCovukhhwZTWAlySENDMJ5JYioBEA02/aOxanhGtSiqCk6+CHPZQt7HMPEJck3hu5nlOE8E25y1a0KVLzBByBirZH6dETEiI0oIfONs1LiN2NYM6DaMlgB2g9VhSqR80jQEEQVTlYoK2hjRKfoNPAjoxIreYgVW4mMY0bFrI4uffnFkizgPMuy/4c18oEbd7Ca8cJFb89Itr9iuoutNDSDGa5eeVayAS3JdNZ7M8nGe29subm1zhqWtK4J586lbBmm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: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: From: Jiazi Li In the following code, the second call to the mas_node_count will return -ENOMEM: mas_node_count(mas, MAPLE_ALLOC_SLOTS + 1); mas_node_count(mas, MAPLE_ALLOC_SLOTS * 2 + 2); This is because there may be some full maple_alloc node in current maple state. Use full maple_alloc node will make max_req equal to 0. And it leads to mt_alloc_bulk return 0. As a result, mas_node_count set mas.node to MA_ERROR(-ENOMEM). Find a non-full maple_alloc node, and if necessary, use this non-full node in the next while loop. Fixes: 54a611b60590 ("Maple Tree: add new data structure") Suggested-by: Liam R. Howlett Signed-off-by: Jiazi Li Signed-off-by: Liam R. Howlett Reviewed-by: Wei Yang --- lib/maple_tree.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 634d49e39a02..fe5c6fab26c3 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -1272,7 +1272,10 @@ static inline void mas_alloc_nodes(struct ma_state *mas, gfp_t gfp) node->node_count += count; allocated += count; - node = node->slot[0]; + /* find a non-full node*/ + do { + node = node->slot[0]; + } while (unlikely(node->node_count == MAPLE_ALLOC_SLOTS)); requested -= count; } mas->alloc->total = allocated;