From mboxrd@z Thu Jan 1 00:00:00 1970 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 C068FC43334 for ; Wed, 6 Jul 2022 02:55:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5758C8E0002; Tue, 5 Jul 2022 22:55:40 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4FCA88E0001; Tue, 5 Jul 2022 22:55:40 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 39E3A8E0002; Tue, 5 Jul 2022 22:55:40 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 2804B8E0001 for ; Tue, 5 Jul 2022 22:55:40 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id F148947E for ; Wed, 6 Jul 2022 02:55:39 +0000 (UTC) X-FDA: 79655159598.01.530A777 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf05.hostedemail.com (Postfix) with ESMTP id 5FC1A10000E for ; Wed, 6 Jul 2022 02:55:39 +0000 (UTC) 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 39B40B81A61; Wed, 6 Jul 2022 02:55:38 +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 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1657076139; a=rsa-sha256; cv=none; b=wgj2FP9VXh0Imb5+URkQsO1dlAfjYVDQMbPWFrzPcOp7QrjGzDUmQ9W21pr145nd5oQx0c 8CyUGx0bPLiJR3hyzXX1Z818yMAiDVyIJesp7tFGWvSRCFDDWZslSwpZzOoKSbqB8nf862 c1+Uao4G8z1ZnTmIpQQPAXRdCYluznU= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=XNVyorfq; dmarc=none; spf=pass (imf05.hostedemail.com: domain of akpm@linux-foundation.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1657076139; 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:in-reply-to:references:references:dkim-signature; bh=LzZkr9Z825NoKNu+kuHxCXd8MpPCC+pYTlc2CENYqn0=; b=usCu4odK5C5tMQV5ISMZV9LTzcu0ZvYNyULP7Xe6f7BSaBZcOT/cVEAA98yFAzwJMmm0fl /0MICAW42EnM/eiNdVm0yK00GyoatDuI/KaxvsNCup4v5R9XhtxYIuroIhjoRlcP37+aTx 80inIhyKTZKoDWIY8euLK56CzdZe5Jo= X-Rspamd-Server: rspam04 X-Rspam-User: Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=XNVyorfq; dmarc=none; spf=pass (imf05.hostedemail.com: domain of akpm@linux-foundation.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org X-Stat-Signature: whw8wxsabfhoygkgzgnfcic1m563gyic X-Rspamd-Queue-Id: 5FC1A10000E X-HE-Tag: 1657076139-646556 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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?