Jason Gunthorpe bd5d3587b2 mm/hmm: return error for non-vma snapshots
The pagewalker does not call most ops with NULL vma, those are all routed
to hmm_vma_walk_hole() via ops->pte_hole instead.

Thus hmm_vma_fault() is only called with a NULL vma from
hmm_vma_walk_hole(), so hoist the NULL vma check to there.

Now it is clear that snapshotting with no vma is a HMM_PFN_ERROR as
without a vma we have no path to call hmm_vma_fault().

Link: https://lore.kernel.org/r/20200327200021.29372-10-jgg@ziepe.ca
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2020-03-30 16:58:36 -03:00
..
2019-08-30 22:43:58 -07:00
2020-02-04 03:05:25 +00:00
2019-12-04 11:08:30 -08:00
2020-02-04 03:05:25 +00:00
2020-02-04 07:21:04 +00:00
2018-06-07 17:34:36 -07:00
2020-02-07 14:48:44 -05:00
2019-09-17 15:20:17 -07:00
2020-01-20 08:05:16 +01:00