Skip to content

Commit

Permalink
thp: khugepaged_prealloc_page() forgot to reset the page alloc indicator
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Xiao Guangrong authored and torvalds committed Oct 9, 2012
1 parent 74c08f9 commit e3b4126
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mm/huge_memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e3b4126

Please sign in to comment.