From 2b0eb35262441ef976b05168fbd87007bfecc4f9 Mon Sep 17 00:00:00 2001 From: Xiao Guangrong Date: Thu, 13 Sep 2012 11:01:01 +1000 Subject: [PATCH] thp: khugepaged_prealloc_page() forgot to reset the page alloc indicator If NUMA is enabled, the indicator is not reset if the previous page request failed, ausing us to trigger the BUG_ON() in khugepaged_alloc_page(). Signed-off-by: Xiao Guangrong Cc: Hugh Dickins Cc: Andrea Arcangeli Cc: Michel Lespinasse Cc: David Rientjes Signed-off-by: Andrew Morton --- mm/huge_memory.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/huge_memory.c b/mm/huge_memory.c index b8d56e7d2945..14bbf6488a9d 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -1798,6 +1798,7 @@ static bool khugepaged_prealloc_page(struct page **hpage, bool *wait) return false; *wait = false; + *hpage = NULL; khugepaged_alloc_sleep(); } else if (*hpage) { put_page(*hpage); -- 2.39.5