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 <mike.kravetz@xxxxxxxxxx> > Cc: Jonathan Cameron <jonathan.cameron@xxxxxxxxxx> > Acked-by: Roman Gushchin <guro@xxxxxx> > Signed-off-by: Barry Song <song.bao.hua@xxxxxxxxxxxxx> Thank you! Reviewed-by: Mike Kravetz <mike.kravetz@xxxxxxxxxx> -- Mike Kravetz