Message ID | 20230314124203.91572-1-zhangpeng.00@bytedance.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1738127wrd; Tue, 14 Mar 2023 05:53:03 -0700 (PDT) X-Google-Smtp-Source: AK7set/tRlyFTwMyn0RxPJNjGgVGMgfxP5nHErCS0QAbjtthsAzprzSgiS9BdGvQsnr18SEXQReY X-Received: by 2002:a17:903:234e:b0:19b:98ce:490e with SMTP id c14-20020a170903234e00b0019b98ce490emr39929584plh.45.1678798382808; Tue, 14 Mar 2023 05:53:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678798382; cv=none; d=google.com; s=arc-20160816; b=pskVEC2O4q6RIPyyHgLEc8UxS202R9ZvuZfSArCrCBuC/uwBjqw8xOZXpuYxKw+mtQ yvGvk2f2dn6iRcv3LTQ59VW+Pts643iWlQ41sMz5cuzkZi2KkPIglFY7zBAeCEI0eKZO lwzOuw9yVUiQtINW6QsJYG/QuyI33C/HJNgfTGvbAWlQcbihkMmnrU8qqr62cTi3qLC7 BawhIQvSXcPbT11bDrCZ0mm9NBrGy0s6ncFezDlJxd+r4xMd2kDnxQOx5l6TtVNtN8BM WPLiE04MPSbjZmo6uXOHoiDUO/If2ABAO4VT4XgvyP4RO2qV3rWSAZCgPB9D7ra+xSQr 14Ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=pdc7UbNBneHho9oqmigekem1agGN/vBMBnNuJZM71Vw=; b=b53uQDNLmvBPAohRlDMauGueJXcdGWipQmStlZGFO/YtE1+h1yLfyoQyX8M86hGnyh Gwf8wRUJnKT7kKUk3M9f7Z9WZuEWVshEp6xTjUfVhWU/t5Iexrs4Oy8urIsdd5S5tBuA bsY+N1MNu8+RZOKTkBLOFQ/HgM4/JmdWqAINF6qlpTNFwPx8/hsUxzMkHdFbwmSEeQsL LnqMRA0nTI6xtcU48jBAnCzceZmLyzqJenQ4HDREInSxxOaq5GLf3ga31tPYpLOncr50 ECELIrZ01By50Yr3P12J/IA/WwZWty79B7YM6LiSRSRcoKmGOpjaVdscOmtplSmAR3b7 ZQtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=Lc4umaDT; 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=bytedance.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a18-20020a170902ecd200b0019cda8d3ae0si2604485plh.457.2023.03.14.05.52.49; Tue, 14 Mar 2023 05:53:02 -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=@bytedance.com header.s=google header.b=Lc4umaDT; 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=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231547AbjCNMm7 (ORCPT <rfc822;realc9580@gmail.com> + 99 others); Tue, 14 Mar 2023 08:42:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231637AbjCNMmj (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 14 Mar 2023 08:42:39 -0400 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D818C94F71 for <linux-kernel@vger.kernel.org>; Tue, 14 Mar 2023 05:42:16 -0700 (PDT) Received: by mail-pf1-x42a.google.com with SMTP id c10so9590697pfv.13 for <linux-kernel@vger.kernel.org>; Tue, 14 Mar 2023 05:42:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1678797735; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=pdc7UbNBneHho9oqmigekem1agGN/vBMBnNuJZM71Vw=; b=Lc4umaDTjOtkaLSsPc4M1IXUWPNZbqF5+yTINoM2IU/nhV4oARdpcU496yWvlohvRx rXsWb7j1wHmB2KIu6/AeKZAlEP3K4OwrVb0zmGG0ppXvUSzPgWkas1X5VSfaJTIqM1LR aPSlnmD5fkZT5PDs8UwHP4gLsNxpHotEjCj72aaJJeW41fmMZ7RtDgBo6XzThJC2U4za QwUlryeriPMTLlE28OTqxTeieaxWGojXBRjf/oH+kOg4l5PRXEIJFF744U6lOkEuqK6o NxabJczCwNOPnMXPHJ1KXGw+mFMQeaIw4ipNYBe75FDrl+KWubWCrFRXx7Z2yP3KcEVh uJ7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678797735; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=pdc7UbNBneHho9oqmigekem1agGN/vBMBnNuJZM71Vw=; b=Q9WARMB5UfHM0v/8eiwQ7MhuBNK4oJ/MpldxCXqr8Y1cAeYe61GS461OMe8Pq2xnHf Zb4foW3e6xBDGVdit/hkGvAgcvQa9yPXw71a0jEQ/gyDelIqSveMaSFfHp8ncW5K2eFz JNhthnzs5/Fpo247PGD3HC+Fexlf/fohYWSija0T3VS0upeEwbb8WkGPLYkHxIccgpCG gbdAgmXWU35OddDr+F9tOZ73vBxUo+gcfllBm8b0CNSV+fs+VfZkGSMHP3PhHVL0QEQ7 pWx04puUS+3lLI7YkCPBe0nv0vtHm2TN1ALMU3iQUsqA2erzGLiM2IlTFjciukGuSMfV jwzQ== X-Gm-Message-State: AO0yUKX5wLZVo+te5+VNDuMAYbzzw5bdspW2cAqcqlyURuDvh47/Ix1f dme0Dna1XEL+FHFp132YMHLsptsWdbXuB376Ok4= X-Received: by 2002:aa7:968e:0:b0:5aa:72c6:4a7d with SMTP id f14-20020aa7968e000000b005aa72c64a7dmr15664029pfk.16.1678797735679; Tue, 14 Mar 2023 05:42:15 -0700 (PDT) Received: from GL4FX4PXWL.bytedance.net ([139.177.225.234]) by smtp.gmail.com with ESMTPSA id s11-20020aa7828b000000b005ded5d2d571sm1509385pfm.185.2023.03.14.05.42.12 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 14 Mar 2023 05:42:15 -0700 (PDT) From: Peng Zhang <zhangpeng.00@bytedance.com> To: Liam.Howlett@oracle.com Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, maple-tree@lists.infradead.org, Peng Zhang <zhangpeng.00@bytedance.com> Subject: [PATCH v2 0/3] Some fixes and cleanup for maple tree. Date: Tue, 14 Mar 2023 20:42:00 +0800 Message-Id: <20230314124203.91572-1-zhangpeng.00@bytedance.com> X-Mailer: git-send-email 2.37.0 (Apple Git-136) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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?1760347692891788871?= X-GMAIL-MSGID: =?utf-8?q?1760347692891788871?= |
Series |
Some fixes and cleanup for maple tree.
|
|
Message
Peng Zhang
March 14, 2023, 12:42 p.m. UTC
Some fixes and clean up for maple tree. The bug fixed by [PATCH v2 1/3] does not seem to be triggered due to some coincidences, because now the implementation of mtree_lookup_walk() scans pivots one by one and exits the loop early. The test cases for the bugs fixed by [PATCH v2 3/3] are difficult to write. If I think of how to write them later, I will send them out. So I send out the second edition first. Changes since v1: - drop [PATCH 4/4] - update the commit message of [PATCH 2/4] - collect Reviewed-bys - add fixes tags Peng Zhang (3): maple_tree: Fix get wrong data_end in mtree_lookup_walk() maple_tree: Simplify mas_wr_node_walk() maple_tree: Fix a potential concurrency bug in RCU mode lib/maple_tree.c | 52 ++++++++++-------------------------------------- 1 file changed, 11 insertions(+), 41 deletions(-)
Comments
Kindly ping. 在 2023/3/14 20:42, Peng Zhang 写道: > Some fixes and clean up for maple tree. > > The bug fixed by [PATCH v2 1/3] does not seem to be triggered due to some > coincidences, because now the implementation of mtree_lookup_walk() scans > pivots one by one and exits the loop early. The test cases for the bugs fixed by > [PATCH v2 3/3] are difficult to write. If I think of how to write them later, > I will send them out. So I send out the second edition first. > > Changes since v1: > - drop [PATCH 4/4] > - update the commit message of [PATCH 2/4] > - collect Reviewed-bys > - add fixes tags > > Peng Zhang (3): > maple_tree: Fix get wrong data_end in mtree_lookup_walk() > maple_tree: Simplify mas_wr_node_walk() > maple_tree: Fix a potential concurrency bug in RCU mode > > lib/maple_tree.c | 52 ++++++++++-------------------------------------- > 1 file changed, 11 insertions(+), 41 deletions(-) >
On Tue, 14 Mar 2023 20:42:00 +0800 Peng Zhang <zhangpeng.00@bytedance.com> wrote: > Some fixes and clean up for maple tree. > > The bug fixed by [PATCH v2 1/3] does not seem to be triggered due to some > coincidences, because now the implementation of mtree_lookup_walk() scans > pivots one by one and exits the loop early. The test cases for the bugs fixed by > [PATCH v2 3/3] are difficult to write. If I think of how to write them later, > I will send them out. So I send out the second edition first. Do we feel that any of these should be backported into -stable kernels? [3/3] looks to be a candidate for this?
* Andrew Morton <akpm@linux-foundation.org> [230404 16:27]: > On Tue, 14 Mar 2023 20:42:00 +0800 Peng Zhang <zhangpeng.00@bytedance.com> wrote: > > > Some fixes and clean up for maple tree. > > > > The bug fixed by [PATCH v2 1/3] does not seem to be triggered due to some > > coincidences, because now the implementation of mtree_lookup_walk() scans > > pivots one by one and exits the loop early. The test cases for the bugs fixed by > > [PATCH v2 3/3] are difficult to write. If I think of how to write them later, > > I will send them out. So I send out the second edition first. > > Do we feel that any of these should be backported into -stable kernels? > [3/3] looks to be a candidate for this? 1 and 3 are fixes and should be sent to stable. 2 doesn't fix anything so I'm not sure how we could get it to be taken.
在 2023/4/5 04:27, Andrew Morton 写道: > On Tue, 14 Mar 2023 20:42:00 +0800 Peng Zhang <zhangpeng.00@bytedance.com> wrote: > >> Some fixes and clean up for maple tree. >> >> The bug fixed by [PATCH v2 1/3] does not seem to be triggered due to some >> coincidences, because now the implementation of mtree_lookup_walk() scans >> pivots one by one and exits the loop early. The test cases for the bugs fixed by >> [PATCH v2 3/3] are difficult to write. If I think of how to write them later, >> I will send them out. So I send out the second edition first. > Do we feel that any of these should be backported into -stable kernels? > [3/3] looks to be a candidate for this? Both [1/3] and [3/3] can be sent to the stable kernel, do I need to do anything?
* Peng Zhang <zhangpeng.00@bytedance.com> [230405 05:53]: > > 在 2023/4/5 04:27, Andrew Morton 写道: > > > On Tue, 14 Mar 2023 20:42:00 +0800 Peng Zhang <zhangpeng.00@bytedance.com> wrote: > > > > > Some fixes and clean up for maple tree. > > > > > > The bug fixed by [PATCH v2 1/3] does not seem to be triggered due to some > > > coincidences, because now the implementation of mtree_lookup_walk() scans > > > pivots one by one and exits the loop early. The test cases for the bugs fixed by > > > [PATCH v2 3/3] are difficult to write. If I think of how to write them later, > > > I will send them out. So I send out the second edition first. > > Do we feel that any of these should be backported into -stable kernels? > > [3/3] looks to be a candidate for this? > > Both [1/3] and [3/3] can be sent to the stable kernel, do I need to do anything? > Usually any bug fixes should have a commit message with: Link: <any discussion> Reported-by: <if necessary> Fixes: <upstream commit> Cc: <stable@vger.kernel.org> and the usual S-O-B, reviewed-by