The patch titled
Subject: mm: fix potential infinite loop in dissolve_free_huge_pages()
has been added to the -mm tree. Its filename is
mm-fix-potential-infinite-loop-in-dissolve_free_huge_pages.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/mm-fix-potential-infinite-loop-in-dissolve_free_huge_pages.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/mm-fix-potential-infinite-loop-in-dissolve_free_huge_pages.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Li Zhong <[email protected]>
Subject: 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().
Signed-off-by: Li Zhong <[email protected]>
Acked-by: Naoya Horiguchi <[email protected]>
Cc: <[email protected]> [3.12+]
Signed-off-by: Andrew Morton <[email protected]>
---
mm/memory_hotplug.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff -puN
mm/memory_hotplug.c~mm-fix-potential-infinite-loop-in-dissolve_free_huge_pages
mm/memory_hotplug.c
---
a/mm/memory_hotplug.c~mm-fix-potential-infinite-loop-in-dissolve_free_huge_pages
+++ a/mm/memory_hotplug.c
@@ -1726,7 +1726,8 @@ repeat:
* dissolve free hugepages in the memory block before doing offlining
* actually in order to make hugetlbfs's object counting consistent.
*/
- dissolve_free_huge_pages(start_pfn, end_pfn);
+ if (hugepages_supported())
+ dissolve_free_huge_pages(start_pfn, end_pfn);
/* check again */
offlined_pages = check_pages_isolated(start_pfn, end_pfn);
if (offlined_pages < 0) {
_
Patches currently in -mm which might be from [email protected] are
mm-fix-potential-infinite-loop-in-dissolve_free_huge_pages.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html