diff options
author | Li Zhong <[email protected]> | 2014-08-06 16:07:56 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2014-08-06 18:01:21 -0700 |
commit | d0177639310d23c7739500df3c6ce6fdfe34acec (patch) | |
tree | c67d79bed5c81e24e6bf616786b6f21726b4f4d4 /tools/perf/scripts/python/net_dropmonitor.py | |
parent | 8fe780484d2674eec27e12bb29c07d3e98a7ad21 (diff) |
mm: fix potential infinite loop in dissolve_free_huge_pages()
It is possible for some platforms, such as powerpc to set HPAGE_SHIFT to
0 to indicate huge pages not supported.
When this is the case, hugetlbfs could be disabled during boot time:
hugetlbfs: disabling because there are no supported hugepage sizes
Then in dissolve_free_huge_pages(), order is kept maximum (64 for
64bits), and the for loop below won't end: for (pfn = start_pfn; pfn <
end_pfn; pfn += 1 << order)
As suggested by Naoya, below fix checks hugepages_supported() before
calling dissolve_free_huge_pages().
[[email protected]: no legitimate reason to call dissolve_free_huge_pages() when !hugepages_supported()]
Signed-off-by: Li Zhong <[email protected]>
Acked-by: Naoya Horiguchi <[email protected]>
Acked-by: David Rientjes <[email protected]>
Signed-off-by: David Rientjes <[email protected]>
Cc: <[email protected]> [3.12+]
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/net_dropmonitor.py')
0 files changed, 0 insertions, 0 deletions