Changing PTEs and PMDs to pte_numa & pmd_numa is done with the
mmap_sem held for reading, which means a pmd can be instantiated
and turned into a numa one while __handle_mm_fault() is examining
the value of old_pmd.
If that happens, __handle_mm_fault() should just return and let
the page fault retry, instead of throwing an oops. This is
handled by the test for pmd_trans_huge(*pmd) below.
The commit removing the BUG_ON landed upstream in 3.16 (linus/master).
commit 107437febd495a5 0e2cd09c81bbaa8 4d30e57b07
Author: Rik van Riel <email address hidden>
Date: Tue Apr 29 15:36:15 2014 -0400
mm/numa: Remove BUG_ON() in __handle_mm_fault()
Changing PTEs and PMDs to pte_numa & pmd_numa is done with the
mmap_sem held for reading, which means a pmd can be instantiated
and turned into a numa one while __handle_mm_fault() is examining
the value of old_pmd.
If that happens, __handle_mm_fault() should just return and let huge(*pmd) below.
the page fault retry, instead of throwing an oops. This is
handled by the test for pmd_trans_
Signed-off-by: Rik van Riel <email address hidden>
Reviewed-by: Naoya Horiguchi <email address hidden>
Reported-by: Sunil Pandey <email address hidden>
Signed-off-by: Peter Zijlstra <email address hidden>
Cc: Andrew Morton <email address hidden>
Cc: Johannes Weiner <email address hidden>
Cc: Kirill A. Shutemov <email address hidden>
Cc: Linus Torvalds <email address hidden>
Cc: Mel Gorman <email address hidden>
Cc: <email address hidden>
Cc: <email address hidden>
Cc: <email address hidden>
Link: http://<email address hidden>
Signed-off-by: Ingo Molnar <email address hidden>