Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp6693491rwl; Mon, 9 Jan 2023 11:41:16 -0800 (PST) X-Google-Smtp-Source: AMrXdXvYAvP37BoabZZxU0iZSctXFWQb6rtDlEW0UeYLI7guos6yrsgXm3UQA78GbonWpj12+xZP X-Received: by 2002:a17:906:308b:b0:7ae:cda1:76d0 with SMTP id 11-20020a170906308b00b007aecda176d0mr52254193ejv.15.1673293276190; Mon, 09 Jan 2023 11:41:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673293276; cv=none; d=google.com; s=arc-20160816; b=W+H9/LGm00h1xdLqi06Pf97TzrzqSzxok6ORHY2qcJEJPVmzg7pdbC7+l6S+UIRKvD SBu1DPtIgiA7tHdeC2I0MIXK1VEw4Neffjsg+jjTd4hh/xAxkPy5Eg/J3lQmdZGP9C1T Y4CiMDnri9kSenFGm9Z0WszBvwwS1+u+91QlyejhL+HZ7PAfOSFiG53hY2AdnwRdJ53p bBehPZ1uKSGRr8QBpWIDOKDmaivP2k53jyOfGZ64edLgf21Je+mohkYS3fP2KPVfsluz i/7wvq0V9b7Lzj/lJVgsQlLabQuauaJdaftUGt3ZfEnNUJB8WOPvp7ZEzRcokhxHa3fm jRGQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=JJbY4hjvKSrIb1Z+aJ+N5rYxnKVh6YpPVZu/7RQrhgs=; b=cUXSTDg6sEcU3mFPHdOQL9TZb/raXoLXDvUipTu8+jVrIkpke3rL6NUWhzWg3Cps6d ulmW5VR2iDINoxD2X7g0dqmDnZId6G9VIoUWP7QVKh0DtAzA2jcZX1ZWznBd2DjU/IiY LZ/cQhwQGsnHdPfHWnEczul5bTJDgDBsph3P5S1O9G4jqMPzAfNxUVYaWsb1qv1aTs8k pXcCprYaCgCzcO1gHhxqLVXlVajYxudRX3+2svQhEA/NZ5wp8lfQHrfsnEJvp9FPTv9t uMyeCPnLrzTOmJWUC7O+sFHjZ79r0voTzTH8/WLVR4rXv7oBhzgbSf9CPngNiTWrlOrl ZboA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Eo/wJqgq"; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m22-20020aa7d356000000b00485dea76f09si9393170edr.634.2023.01.09.11.41.00; Mon, 09 Jan 2023 11:41:16 -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=@kernel.org header.s=k20201202 header.b="Eo/wJqgq"; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237305AbjAITW5 (ORCPT + 54 others); Mon, 9 Jan 2023 14:22:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237443AbjAITWz (ORCPT ); Mon, 9 Jan 2023 14:22:55 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 786A16C7CB for ; Mon, 9 Jan 2023 11:22:53 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 314B7B80DAA for ; Mon, 9 Jan 2023 19:22:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5C2AFC433EF; Mon, 9 Jan 2023 19:22:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673292170; bh=1nN5+8vpW7IEZWlJ5SAxUljzv4o1B741QRXt26soY7I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Eo/wJqgqrCF9C+wRp8CP4a9/NTfNfcMNw8C9PYuDJIrA4CBH+FD6MEXmbE0+67ifY FzsJOhpsDklYmeRTVQw5S0rFZP/E7R9Nvljj29dg305NaNcgZeXDXBO2DWJ2Tcq7Jl bdb5Fm0PtOuf4r+dwBCH7f5Rs00GlGId75Z66JbdxHLy74WkjeL+1teLIKAaqeC8Uk aV6U+N8PNPEH0eKoaMsDWpF9mYwwIuwxqYE2fdApA8oW50k3YJC9jMJRbOS3l8AahX WiHoGiFkkPn/XSdDSf0PbkLx4lfcFGCfljJ3/9CClzlf5jl5c8amuN0EYAcV+Y2oA3 irnGHYGgrbjsg== From: SeongJae Park To: Liam Howlett Cc: "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , Andrew Morton , "maple-tree@lists.infradead.org" , SeongJae Park Subject: Re: [PATCH] maple_tree: Fix handle of invalidated state in mas_wr_store_setup() Date: Mon, 9 Jan 2023 19:22:48 +0000 Message-Id: <20230109192248.55694-1-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230109165455.647400-1-Liam.Howlett@oracle.com> References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 9 Jan 2023 16:55:42 +0000 Liam Howlett wrote: > If an invalidated maple state is encountered during write, reset the > maple state to MAS_START. This will result in a re-walk of the tree to > the correct location for the write. > > Link: https://lore.kernel.org/all/20230107020126.1627-1-sj@kernel.org/ > Reported-by: SeongJae Park > Signed-off-by: Liam R. Howlett Tested-by: SeongJae Park I confirmed this patch fixes the boot failure issue. Nevertheless, the 'make install' issue on my system is still not fixed. Thanks, SJ > --- > lib/maple_tree.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/lib/maple_tree.c b/lib/maple_tree.c > index 14cff87cf058..59c4879ac714 100644 > --- a/lib/maple_tree.c > +++ b/lib/maple_tree.c > @@ -5620,6 +5620,9 @@ static inline void mte_destroy_walk(struct maple_enode *enode, > > static void mas_wr_store_setup(struct ma_wr_state *wr_mas) > { > + if (unlikely(mas_is_paused(wr_mas->mas))) > + mas_reset(wr_mas->mas); > + > if (!mas_is_start(wr_mas->mas)) { > if (mas_is_none(wr_mas->mas)) { > mas_reset(wr_mas->mas); > -- > 2.35.1 >