]> 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>
Thu, 13 Sep 2012 01:01:01 +0000 (11:01 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 13 Sep 2012 07:28:03 +0000 (17:28 +1000)
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 1b327a42f9e6b5136035d04c3f07c0871b6dc2c6..d50d574cd67e7c8932956996dd60342a009321c9 100644 (file)
@@ -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);