From: Xiao Guangrong Date: Thu, 13 Sep 2012 01:01:01 +0000 (+1000) Subject: thp: khugepaged_prealloc_page() forgot to reset the page alloc indicator X-Git-Tag: next-20120918~1^2~118 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=14e6367484c235a72d5a42cc099524f1cbc2610f;p=karo-tx-linux.git 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 --- diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 1b327a42f9e6..d50d574cd67e 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -1822,6 +1822,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);