Message ID | 20231101171629.3612299-3-Liam.Howlett@oracle.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:abcd:0:b0:403:3b70:6f57 with SMTP id f13csp576953vqx; Wed, 1 Nov 2023 10:17:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFIdIDimjfOc/zYCsBCBPNEAIwTHGHvNH2J51PYmrDTkJx1z7quXaIsPb/DleSko23Czppt X-Received: by 2002:a17:902:ab81:b0:1ca:7f91:aa5d with SMTP id f1-20020a170902ab8100b001ca7f91aa5dmr14769194plr.16.1698859033434; Wed, 01 Nov 2023 10:17:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1698859033; cv=pass; d=google.com; s=arc-20160816; b=m4TfpBei6sloD7nNy8O7iYtbEj4jvLucgwGlGn4BCxjevAt3+YkGmZW6dIHkrxR2MU HkV94Nqe5bDQMq1JJxBnI3noYVgr0ku0C/eWbJtmsEWcyCilDGZeOrnxkVfAaPx41+tG GvDTetA4AwpPfsMTtxlP9aEWj6rf+MIPMx84imXbeCErhKpE6MfI1B9Xi4BEZiRn9yfs q4+CVsDa8NckFNzw1FA8BFkfMLKmIdFz8G49mPooJulfRCa9NOoqkfZfjzvYdPMaeLtd ZKKaqDrRH/u0VyK4hhpzzuecbUwpmEZrXbVJ3inFzJfe2E2wfCq9VqCQDemqXXTDTJo5 dXzA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=Zarp750TVlHsFqy+aCF+76v+a9/pzTdUI61HbGsIja4=; fh=sqYK5Y/v5icROmgliQW9NiOFsItnxBrn6htbBDuI6Vo=; b=lIXecp3SmubNJt8xtPhDHL5f2t/h3wCgj4eDF5VCgNFX/dBPLf5ZAP50NIuu76/eoW ngQmnLcX+gzbryTU488jWOya6tAJ5tbmO0jVmNAWTv7eslrchif4vTHhJBgz79socqdV XkgmiKiq3ywqx1QAjxv5QZzn+5KGONYwQiA9uO2vTsmtsdP5qOooZocJO0QlRDZeYuIT b8uIlQqqbl9/GuRr7IVNbgNQmsIlJeNNmEDF+RR/7fJAHsRBx2VvnbL1UOax4e1d/mFr vuLbZ9LRazNWby0mS2XW4oDOWmP2RMvGPZVjfuCCJ2VqHp8neC9AIYkMV7vp3HEtb4SG UEjw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=UEyaQArx; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=TYRpq4i7; 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::3:2 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 agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id v10-20020a170902d08a00b001bb9375b349si3196021plv.536.2023.11.01.10.17.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 10:17:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=UEyaQArx; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=TYRpq4i7; 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::3:2 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id E4A418028F99; Wed, 1 Nov 2023 10:17:06 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344694AbjKARQ4 (ORCPT <rfc822;rbbytesnap@gmail.com> + 34 others); Wed, 1 Nov 2023 13:16:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344562AbjKARQy (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 1 Nov 2023 13:16:54 -0400 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81697BD for <linux-kernel@vger.kernel.org>; Wed, 1 Nov 2023 10:16:51 -0700 (PDT) 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 3A1GYoW2011191; Wed, 1 Nov 2023 17:16:43 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=Zarp750TVlHsFqy+aCF+76v+a9/pzTdUI61HbGsIja4=; b=UEyaQArxB7hm37RvfLE46QbTpvSxcylvJ0YEv4OkY3vGhQh8Ltd1Ej0kKdQKEX9Dd1pf YbxXYSqw4XFW53Nr8v0KxsI6dobtlPz2H5xSB7lXeMejBBTDZ7yL3LZUxMB7jP9HL6PO 63gts7JbGw/NPQuSdY3KhdtJzwD1+cDKr229AAFTuYIVmKPjdlAD66LmCuxHC3/9Ol7/ KWMYlYAX/tZr3kqL/JzKQ7D+WvqpfYjBqvX8oAmSa0VHZQhHzpw59vevhbTnITxMrYmM QSIp3Cv/p1fLtt3fpnwjsApEl0wgpmC7TXNOmONwpDpX9p3mwBm/8yPGFPIsruAOpJ4l 8w== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u0s7byxsb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 01 Nov 2023 17:16:43 +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 3A1GVSup022547; Wed, 1 Nov 2023 17:16:41 GMT Received: from nam04-bn8-obe.outbound.protection.outlook.com (mail-bn8nam04lp2040.outbound.protection.outlook.com [104.47.74.40]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3u0rr7br7h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 01 Nov 2023 17:16:41 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dIKRmP3L0a8xZ7b/FxmEYvoo+BrMADv9PPEA6+UHm2isFGFn+7ZPPDOmr4GGCs0qhxzi8ExsZAp14ur7OQsBIEFnxVLGDna3jMxA5JJKLjU/ePk1EY9zJe+TgJvVj0RzNh4bXIsM4WEewRc2YZo8kNXMGnd9/9reP/0G7m8oCCRom21iLa1DoTQmJVswjzVC/qCr7TkW972bRJM0Tz/vmJ8zL4EedYzMf4O7KQnkQNU3YHhcKaragVSCO1HGJLfGxomevkoZtoDG5uUhlRZAyJR63T1rpMxPTBUEdmAj8iQM/5jw1RNr/nXMoSVdoknM0oUhMikcjN70392cJJYtYA== 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=Zarp750TVlHsFqy+aCF+76v+a9/pzTdUI61HbGsIja4=; b=ob0UGcc0wJhBZekAGCcDh196PzVErzpyIW19TvzT+N1E0PD7RgOSRFWXci4MwVOY+dGc0rDWR2EHMX5l92rLqWqdts9pQVG2khe2idWVrVZCCEoQcsd2AA2jaBiZvftMy+kI3z3qRKVSiDOid/zOLWLNCMsZRYjqe/4KjHhxJSWDRzI7Xb8QD6rU3YSVNJjxGX0KBojkVCe25oRkNH6PpZ76PReXpggmDpVNB1Da4LCXSPqW6m+ZFD0sJAQM/Pl/43pKysP7TG7djKSjciZxFKvB025aWIPjlFoA0yMYky16vXv+zFO/s8s+Toyf0yWqcTgUkCXKfeCKtdCQ8XINZQ== 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=Zarp750TVlHsFqy+aCF+76v+a9/pzTdUI61HbGsIja4=; b=TYRpq4i74w6HtiNcDY1SNWB9gZKLJZihUrQTBd2ZnfFQO/la+71rkvBbUr99uojiFfhrJsppi46TeYwTeea1Guo3CEKKeA2Y2znCyhmH/LEMPO8l4pOAfAOoAKU0V3QFeAC4fjkUhpn45KLpd2HxPDvz7MbB90Le75FQWCvC9RU= Received: from SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) by SA1PR10MB7684.namprd10.prod.outlook.com (2603:10b6:806:38e::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.31; Wed, 1 Nov 2023 17:16:40 +0000 Received: from SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::8979:3e3f:c3e0:8dfa]) by SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::8979:3e3f:c3e0:8dfa%4]) with mapi id 15.20.6907.025; Wed, 1 Nov 2023 17:16:40 +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> Subject: [PATCH 02/12] maple_tree: Make mas_erase() more robust Date: Wed, 1 Nov 2023 13:16:19 -0400 Message-Id: <20231101171629.3612299-3-Liam.Howlett@oracle.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231101171629.3612299-1-Liam.Howlett@oracle.com> References: <20231101171629.3612299-1-Liam.Howlett@oracle.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: YT4PR01CA0500.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:10c::29) To SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN6PR10MB3022:EE_|SA1PR10MB7684:EE_ X-MS-Office365-Filtering-Correlation-Id: ad6d2a9c-9aa2-4d0c-bdea-08dbdafe5007 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ash5OAdfhWSD8TYTWpzY4xjYjpqv6fuRKQXkhr02udmvMSv0XUNLqSJe0nwtvxcfB/9JFXzjEeURNpNRzgRDvubE/PzisPGRfRAgH/cCGGEUNHHQ3JNXhOLjplI7D4A0nK/i0eoHzvK3ztVYFXE/MkeEFmBUnGxaTgVNEPybnVwHx0mwrxxZR1RLVCq6FO8Qvlg1PgNEKA4uA0W1SgZW94DGM76+ia2c2mNjc5ad1qADubwI5EVnU/cpiKimOglA7qlBf6VUlu64F81y+wUV9Sh8XX9Sbdeyw9zTPC0IK+X885esAuJ8vP6P+nvxuc2+bkJ96XaoinqxL0ERA/Ig4k6ea6iaZxMZp3DXV5fQ0oAUEp2jOjXTyC4nqXuQHq9Bm4FZFzk3MJCwlOx5qxPAaEfE1jLblQd5Ra7nOhD50SMDcyLEUcGU5FE6883G0FPd4MPHX5c2cV1JAkzLwjvhuDVp++0vVWmEtkjDl39v6lBGJCDzWt/NvoJpv1pyKeOFB9x8Y2x3tuf7xcJebAv0ZD1gnyMxmEaBh3boVv9GlFk+N9vUO1YIR7qcVsK0PSVk 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:(13230031)(346002)(136003)(376002)(366004)(396003)(39860400002)(230922051799003)(186009)(451199024)(1800799009)(64100799003)(6486002)(8936002)(2906002)(4326008)(41300700001)(4744005)(8676002)(5660300002)(66899024)(6666004)(6506007)(66476007)(107886003)(83380400001)(1076003)(2616005)(36756003)(26005)(6512007)(38100700002)(316002)(86362001)(478600001)(66556008)(6916009)(66946007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 3JPP0hnmCJmVVkybsYwzDbvJvhRIE1UuNeBys1v5NBMUuC+Oll2uB1I8JzgDgXOe9AMEsNZ+zg9Y6aSWTaiw4EC6kuU59aQ9PDxNMbolR52sNcn68dgYZOwwbv5gq9WswORxsN8R8we20xxNTzZkvZpOUWIpOgPqwpsD70FtPNsteYE8Rq9oFNutbpr4Wg7FmnNoO3AR6ljAKW2wzd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WS12Rvl3kekQOLIj+zSWHdIxWwseawA6/ZZ8Ui1FSUSTtrOgPjOMmBeDLPHxmPP7Ctr7wk4t8LX7M6N9uHcc/nyu2KSBHHgBHoTA3VXzgbeom7pX74QCUmr8LDrLpv8hRbqOBCUbnEtRQ5tEYo2TRIflVEz6fbnrdSaSxNkitQqQKPher9VNMnB5Udi7BA81L4j5usV4bONeA== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: ad6d2a9c-9aa2-4d0c-bdea-08dbdafe5007 X-MS-Exchange-CrossTenant-AuthSource: SN6PR10MB3022.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Nov 2023 17:16:40.3679 (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: bO8vUXqp8Y60B+ZwWLUA7WHgON74z6jcPj4u3gOmBUuir5MIlFYeRIPhgX2dJz8m9TUqSLgSHwWO6se0tiBDZw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR10MB7684 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-01_15,2023-11-01_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 malwarescore=0 mlxscore=0 mlxlogscore=999 adultscore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2310240000 definitions=main-2311010134 X-Proofpoint-GUID: 6kGqw8JWo8JFCm603ROyXiBMqoodNANf X-Proofpoint-ORIG-GUID: 6kGqw8JWo8JFCm603ROyXiBMqoodNANf X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 01 Nov 2023 10:17:06 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781382809860217722 X-GMAIL-MSGID: 1781382809860217722 |
Series |
maple_tree: iterator state changes
|
|
Commit Message
Liam R. Howlett
Nov. 1, 2023, 5:16 p.m. UTC
mas_erase() may not deal correctly with all maple states. Make the
function more robust by ensuring the state is in one of the two
acceptable states.
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
---
lib/maple_tree.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 0fcbfa7e9942..b6b2d7031cae 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -6161,7 +6161,7 @@ void *mas_erase(struct ma_state *mas) void *entry; MA_WR_STATE(wr_mas, mas, NULL); - if (mas_is_none(mas) || mas_is_paused(mas)) + if (!mas_is_active(mas) || !mas_is_start(mas)) mas->node = MAS_START; /* Retry unnecessary when holding the write lock. */