diff options
author | Yang, Philip <[email protected]> | 2019-08-15 20:52:56 +0000 |
---|---|---|
committer | Jason Gunthorpe <[email protected]> | 2019-08-23 10:22:20 -0300 |
commit | e3fe8e555dd05cf74168d18555c44320ed50a0e1 (patch) | |
tree | 93a7d05212b8be9eabffd7ecb0b4358f061c2293 /lib/test_overflow.c | |
parent | c96245148c1ec7af086da322481bf4119d1141d3 (diff) |
mm/hmm: fix hmm_range_fault()'s handling of swapped out pages
hmm_range_fault() may return NULL pages because some of the pfns are equal
to HMM_PFN_NONE. This happens randomly under memory pressure. The reason
is during the swapped out page pte path, hmm_vma_handle_pte() doesn't
update the fault variable from cpu_flags, so it failed to call
hmm_vam_do_fault() to swap the page in.
The fix is to call hmm_pte_need_fault() to update fault variable.
Fixes: 74eee180b935 ("mm/hmm/mirror: device page fault handler")
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Philip Yang <[email protected]>
Reviewed-by: "Jérôme Glisse" <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
Diffstat (limited to 'lib/test_overflow.c')
0 files changed, 0 insertions, 0 deletions