diff options
author | Barry Song <[email protected]> | 2020-07-23 21:15:30 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2020-07-24 12:42:41 -0700 |
commit | dbda8feadfa46b3d8dd7a2304f84ccbc036effe9 (patch) | |
tree | cd57ca585afbf0aed49f65effb9738e542630414 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | d38a2b7a9c939e6d7329ab92b96559ccebf7b135 (diff) |
mm/hugetlb: avoid hardcoding while checking if cma is enabled
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.
[[email protected]: fix CONFIG_CMA=n warning]
[[email protected]: better checks before using hugetlb_cma]
Link: http://lkml.kernel.org/r/[email protected]
Fixes: cf11e85fc08c ("mm: hugetlb: optionally allocate gigantic hugepages using cma")
Signed-off-by: Barry Song <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Reviewed-by: Mike Kravetz <[email protected]>
Acked-by: Roman Gushchin <[email protected]>
Cc: Jonathan Cameron <[email protected]>
Cc: <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions