From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0AC4E606A320 for ; Tue, 27 Oct 2026 17:06:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=aY9YZAdF; dkim=fail reason="signature verification failed" (1024-bit key, unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=foss header.b=LX9oQFb3 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=D1cH5AJXBZios6iH9BEG5HshbFE4vOSwklw7BRVEwV4=; b=aY9YZAdFSLO90RMMWjQ4FvTMzT gqiT1pgRPucVnFr0Wxi6pipkveDBu7rCm12RNCMkJwDC+n6sUCGyt/eqpopxGcwjRGj+HWbG6VCFj frDRJWKOOz1Xd/HGavkCLlamsWLiBvHbS/1N5F5w0yCAlKH/4WifF2cnWfte4puzG1kn2h4CLv9lM jJgsBNlmlblne2QpDas4z/M3rkSZoQ3xKllwkWonYZFbqQT6ucBaC70ZKwfIYPKNVvaOvcc0RT8e2 jd1GPZzi3PVrb7/k+ruaJv1RvqVV563708HBi5uv1ta0z189lAeGKpu/aj7G54fkOYNjWo9mCTQlM KA3RkuzA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xLkct-00000005RF2-1DqK; Tue, 27 Oct 2026 17:06:19 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xLkcr-00000005REZ-0R7h; Tue, 27 Oct 2026 17:06:18 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D61871650; Tue, 27 Oct 2026 10:06:12 -0700 (PDT) Received: from arm.com (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8FEFF3F7B4; Tue, 27 Oct 2026 10:06:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1793120776; bh=YfBOcf/1p0yKe28rQCyfQziZDw3iZcDMCiJAcTFH3s0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LX9oQFb3JCU/nRh3HOHfyGm75yvY2AqOJkXgl4H1OUrL+YV/yfv5t2j4NyOmkDQk9 wJjiz2smZNW3BasgYXW2q2tqg9DtW18Hjbi6WScVSvfUxSgq2xS9N/BwOrfVKoiH+i KRo062zN72Uh7zYRswDgomQDOFjW4Mykh8WDYZzM= Date: Tue, 27 Oct 2026 17:06:11 +0000 From: Catalin Marinas To: Muchun Song Cc: Andrew Morton , David Hildenbrand , Oscar Salvador , Dave Hansen , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , =?iso-8859-1?Q?Bj=F6rn_T=F6pel?= , Will Deacon , Mark Rutland , Kevin Brodsky , Alexander Gordeev , Alistair Popple , linux-mm@kvack.org, linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Muchun Song Subject: Re: [PATCH v3 4/4] arm64/mm: fix destructor for unconstructed hotplug page tables Message-ID: References: <20261023063428.3658761-1-songmuchun@bytedance.com> <20261023063428.3658761-5-songmuchun@bytedance.com> X-Archived-By: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20261023063428.3658761-5-songmuchun@bytedance.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261027_100617_205902_450D84FF X-CRM114-Status: GOOD ( 10.55 ) X-Spam-Score: -4.4 (----) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" X-Spam-Status: No, score=-9.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On Fri, Oct 23, 2026 at 02:34:28PM +0800, Muchun Song wrote: > Commit c594b83457cc ("arm64: mm: call pagetable dtor when freeing > hot-removed page tables") made free_hotplug_pgtable_page() > unconditionally run the page-table destructor. This matches page tables > allocated by the arm64 mapping code, which runs the corresponding > constructors. > > However, arm64 also uses the generic sparse-vmemmap population code. > Runtime intermediate page tables allocated by that code do not run a > page-table constructor. Freeing one during memory hot-remove therefore > runs a destructor without a matching constructor and corrupts > NR_PAGETABLE accounting. > > Free intermediate page-table pages through pagetable_free(). It runs the > destructor only for constructor-backed pages and then releases the page > through the page-table freeing path. > > Fixes: c594b83457cc ("arm64: mm: call pagetable dtor when freeing hot-removed page tables") > Cc: stable@vger.kernel.org > Assisted-by: LLM > Signed-off-by: Muchun Song > Reviewed-by: Kevin Brodsky > Acked-by: David Hildenbrand (Arm) Reviewed-by: Catalin Marinas _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv