On 7/9/20 5:57 PM, Barry Song wrote:
> hugetlb_cma[0] can be NULL due to various reasons, for example, node0 has
> no memory. so NULL hugetlb_cma[0] doesn't necessarily mean cma is not
> enabled. gigantic pages might have been reserved on other nodes.
> This patch fixes possible double reservation and CMA leak.
>
> Fixes: cf11e85fc08c ("mm: hugetlb: optionally allocate gigantic hugepages
> using cma")
> Cc: Mike Kravetz <[email protected]>
> Cc: Jonathan Cameron <[email protected]>
> Acked-by: Roman Gushchin <[email protected]>
> Signed-off-by: Barry Song <[email protected]>
Thank you!
Reviewed-by: Mike Kravetz <[email protected]>
--
Mike Kravetz