]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
thp: khugepaged_prealloc_page() forgot to reset the page alloc indicator
authorXiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Fri, 28 Sep 2012 00:19:50 +0000 (10:19 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 8 Oct 2012 03:00:15 +0000 (14:00 +1100)
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 <xiaoguangrong@linux.vnet.ibm.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Michel Lespinasse <walken@google.com>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/huge_memory.c

index db68850d9e8dec8839c16bdf66d2b267587de47c..8d8be695fd920cb91decba8e127fd7756e472105 100644 (file)
@@ -1864,6 +1864,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);