Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp1971682imw; Tue, 5 Jul 2022 20:01:17 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tuETyDiLPzATrwT6DpFfAAWlUYPeFdLs4zDNbVnTUI+WlqU5ddVEqpztcWGuhLz1E4qCUf X-Received: by 2002:a05:6402:4011:b0:43a:84de:26b1 with SMTP id d17-20020a056402401100b0043a84de26b1mr3013654eda.402.1657076477005; Tue, 05 Jul 2022 20:01:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657076477; cv=none; d=google.com; s=arc-20160816; b=EFIErR9dzAtpLQhZ4YbdNSb9T6D9BfmJVBuljhkkIun8Dkpm39rbpXwtyCZA4/xre4 mlHJZjs3s+CoSgfi95ToEaFRtdVYmF6JZrW+jgpyIBQNl6floOFi4yCbxBQAUrUGW28x fhr04cMZFK3TG6vRfPWrs+/Ef29MWcpdgsMJfHJekXjEr4dT9OG/e1rSCVgVwPRav8Qs LwmcwpD0oFwnZfk29CC9vbAu1DecDZeknVuQO2iDX3NEnCJrbPEvKb1S9Zpg/qiqGvFn uykBFqNuO3on+yxkomhESbRjpP4a8myHqqF2/TUUURg/pdkOoXG0KUwp5zKRzJIW0sr2 MT5w== 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:subject:cc:to:from:date :dkim-signature; bh=LzZkr9Z825NoKNu+kuHxCXd8MpPCC+pYTlc2CENYqn0=; b=zd/DgsuCPvlrtu/Z5ev2WhjJSoN9DWyBuVDc9rEqYo8/FYfDegu8cAjtnvIYRnQgEh EbOfwyqydM3dAwp9wapjxE+wuXLpEdhIGTltu23GeWO2BVHjjH142dA115w4D5/97HlY h+EqXJLMF+AdoYT8JrE7N1AbQ96b9PRdm+Oo4ecV9nDq8NIihNMdde3KR7R7nPbPtapG 0qFRw7GtNC0+5JgQBLa5j19TSpEe5TIGDH7FZDRonGk3ZLqNzzUGkklpLLYyTIMWQgqD CUYgeqmR0d4OzIm/5v8osjlGQwB3plvFKo0iSwlqb/ShVszfFRRM/Bdu6ZNJKp1Gd+To Bcwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=XNVyorfq; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s23-20020a50ab17000000b0043a49608b12si11665113edc.540.2022.07.05.20.00.50; Tue, 05 Jul 2022 20:01:16 -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=@linux-foundation.org header.s=korg header.b=XNVyorfq; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230293AbiGFCzj (ORCPT + 99 others); Tue, 5 Jul 2022 22:55:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229535AbiGFCzi (ORCPT ); Tue, 5 Jul 2022 22:55:38 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9DC0E020 for ; Tue, 5 Jul 2022 19:55:37 -0700 (PDT) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 74F1A61927 for ; Wed, 6 Jul 2022 02:55:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ADFE6C341C7; Wed, 6 Jul 2022 02:55:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1657076136; bh=aZe8FghVjL3+BWsHGygyWWsDx2e7R00gyJLLEN8krq4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=XNVyorfq726NBsGrpN6mGHeBsxpTSAitFOiLHGyYh7mgvyqBBP3kMZNARjKHb8jAS lRBRON2JEKnmC8ZyaEbiztcOtljZfbYTmZ5UXzrpvUFSVb50dpSO/SpM14UG90GlEi WAvlW3N1Xe+eoEkcBZRVM+yZM/7z2zaHvtd8ZixE= Date: Tue, 5 Jul 2022 19:55:35 -0700 From: Andrew Morton To: Liam Howlett Cc: "maple-tree@lists.infradead.org" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , Yu Zhao Subject: Re: [PATCH] maple_tree: Fix use of node for global range in mas_wr_spanning_store() Message-Id: <20220705195535.a32ce0de9b45fe73eea72c82@linux-foundation.org> In-Reply-To: <20220706020526.1869453-1-Liam.Howlett@oracle.com> References: <20220706020526.1869453-1-Liam.Howlett@oracle.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Wed, 6 Jul 2022 02:05:37 +0000 Liam Howlett wrote: > When writing a range with a NULL which expands to 0 - ULONG_MAX, don't > use a node to store this value. Instead, call mas_new_root() which will > set the tree pointer to NULL and free all the nodes. > > Fix a comment for the allocations in mas_wr_spanning_store(). > > Add mas_node_count_gfp() and use it to clean up mas_preallocate(). > > Clean up mas_preallocate() and ensure the ma_state is safe on return. > > Update maple_tree.h to set alloc = NULL. Cool. How are we looking now? Any known issues still being worked on?