summaryrefslogtreecommitdiff
path: root/mm/huge_memory.c
diff options
context:
space:
mode:
authorXiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>2012-10-09 03:32:57 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-09 11:22:52 +0400
commite3b4126c556ca3a07699adf202d44bed3f453638 (patch)
treeb2eb0c6082dffc1e9a2629d8847a16f66cdd1345 /mm/huge_memory.c
parent74c08f982674cfd5dfeb2702d631db9bcdabf788 (diff)
downloadlinux-e3b4126c556ca3a07699adf202d44bed3f453638.tar.xz
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 <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> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/huge_memory.c')
-rw-r--r--mm/huge_memory.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 7cf8b0ec11ec..7153e0d18670 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);