[PATCH v4 0/2] arm64/mm: prevent panic on -ENOMEM in arch_add_memory()
Catalin Marinas
cmarinas at kernel.org
Thu Nov 13 10:59:03 PST 2025
From: Catalin Marinas <catalin.marinas at arm.com>
On Fri, 17 Oct 2025 10:44:35 +0530, Linu Cherian wrote:
> arch_add_memory() acts as a means to hotplug memory into a system. It
> invokes __create_pgd_mapping() which further unwinds to call
> pgtable_alloc(). Initially, this path was only invoked during early boot
> and therefore it made sense to BUG_ON() in case pgtable_alloc() failed.
> Now however, we risk running into a kernel crash if we try to hotplug
> memory into a system that is already extremely tight on available
> memory. This is undesirable and hence __create_pgd_mapping() and it's
> helpers are reworked to be able to propagate the error from
> pgtable_alloc() allowing the system to fail gracefully.
>
> [...]
Applied to arm64 (for-next/misc), thanks!
[1/2] arm64/mm: Allow __create_pgd_mapping() to propagate pgtable_alloc() errors
https://git.kernel.org/arm64/c/bfc184cb1ba7
[2/2] arm64/mm: Rename try_pgd_pgtable_alloc_init_mm
https://git.kernel.org/arm64/c/1b214452b6a7
--
Catalin
More information about the linux-arm-kernel
mailing list