Re: [PATCH] mm/cma: reject long-term pins of HugeTLB folios overlapping crashkernel CMA
From: David Hildenbrand (Arm)
Date: Wed Nov 25 2026 - 17:43:54 EST
On 11/25/26 16:51, Sang-Heon Jeon wrote:
> crashkernel=size,cma uses existing hugetlb_cma memory, so
> crashk_cma_ranges[] may contain HugeTLB folios. HugeTLB folios allocated
> from hugetlb_cma can be long-term pinned without being migrated.
>
> After a crash, the crash kernel uses the memory in crashk_cma_ranges[],
> but a device can still write to a long-term pinned folio.
>
> So reject long-term pins of HugeTLB folios overlapping
> crashk_cma_ranges[].
>
> Signed-off-by: Sang-Heon Jeon <ekffu200098@xxxxxxxxx>
> ---
> The above scenario is only possible with the two patches below applied.
> Currently only linux-next, which is targeting v7.5, has both of them.
>
> "mm/hugetlb: allow crashkernel to reuse hugetlb CMA memory" (kexec-next)
I think that's a real problem with this thing.
The solution is not to disallow long-term pinning. :/
--
Cheers,
David