]> git.karo-electronics.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>
Wed, 26 Sep 2012 01:33:53 +0000 (11:33 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 27 Sep 2012 07:26:55 +0000 (17:26 +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 2b2019b35b8d7c5435e684d1c22bde75dd53dff3..7ef62d5ce967a39839614ed411530ee323e2b7c6 100644 (file)
@@ -1882,6 +1882,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);