From: Xiao Guangrong Date: Mon, 8 Oct 2012 23:32:57 +0000 (-0700) Subject: thp: khugepaged_prealloc_page() forgot to reset the page alloc indicator X-Git-Tag: v3.7-rc1~53^2~53 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e3b4126c556ca3a07699adf202d44bed3f453638;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.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 Signed-off-by: Linus Torvalds --- diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 7cf8b0e..7153e0d1 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -1797,6 +1797,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);