Commit 7d082987 authored by Jason Gunthorpe's avatar Jason Gunthorpe

mm/hmm: add missing pfns set to hmm_vma_walk_pmd()

All success exit paths from the walker functions must set the pfns array.

A migration entry with no required fault is a HMM_PFN_NONE return, just
like the pte case.

Fixes: d08faca0 ("mm/hmm: properly handle migration pmd")
Reviewed-by: default avatarRalph Campbell <rcampbell@nvidia.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent 05fc1df9
...@@ -402,7 +402,7 @@ static int hmm_vma_walk_pmd(pmd_t *pmdp, ...@@ -402,7 +402,7 @@ static int hmm_vma_walk_pmd(pmd_t *pmdp,
pmd_migration_entry_wait(walk->mm, pmdp); pmd_migration_entry_wait(walk->mm, pmdp);
return -EBUSY; return -EBUSY;
} }
return 0; return hmm_pfns_fill(start, end, range, HMM_PFN_NONE);
} else if (!pmd_present(pmd)) } else if (!pmd_present(pmd))
return hmm_pfns_fill(start, end, range, HMM_PFN_ERROR); return hmm_pfns_fill(start, end, range, HMM_PFN_ERROR);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment