Re: [PATCH v2 3/4] mm: hugetlb: fix GFP mask propagation to CMA

From: Muchun Song

Date: Thu Nov 05 2026 - 00:18:27 EST




> On Nov 5, 2026, at 12:07, Qi Zheng <qi.zheng@xxxxxxxxx> wrote:
>
> From: Qi Zheng <zhengqi.arch@xxxxxxxxxxxxx>
>
> cma_alloc_frozen_compound() uses GFP_KERNEL, allowing direct reclaim
> during the first MPOL_PREFERRED_MANY allocation attempt even though
> the caller clears __GFP_DIRECT_RECLAIM.
>
> Pass the caller's GFP mask through the helper so CMA respects its
> reclaim constraints when trying the preferred nodes.

More natural.

>
> Fixes: 9bda131c6093 ("mm: cma: add cma_alloc_frozen{_compound}()")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Qi Zheng <zhengqi.arch@xxxxxxxxxxxxx>

Acked-by: Muchun Song <muchun.song@xxxxxxxxx>

Thanks.