[PATCH v2 4/4] arm64/mm: fix destructor for unconstructed hotplug page tables

Kevin Brodsky kevin.brodsky at arm.com
Tue Oct 13 08:46:40 PDT 2026


On 10/10/2026 13:24, 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 at vger.kernel.orgAssisted-by: LLM Signed-off-by: Muchun Song
> <songmuchun at bytedance.com>

Reviewed-by: Kevin Brodsky <kevin.brodsky at arm.com>



More information about the linux-arm-kernel mailing list