diff options
author | Jason Gunthorpe <jgg@mellanox.com> | 2019-11-12 16:22:20 -0400 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2019-11-23 19:56:44 -0400 |
commit | 04ec32fbc2b29a640d67872d2f88daac4c73e45b (patch) | |
tree | 35b141b60ac0b95cbaad2418b39fa7ec662c6cc1 /fs/utimes.c | |
parent | 99cb252f5e68d72afa3245a4e73d216d295cd335 (diff) |
mm/hmm: allow hmm_range to be used with a mmu_interval_notifier or hmm_mirror
hmm_mirror's handling of ranges does not use a sequence count which
results in this bug:
CPU0 CPU1
hmm_range_wait_until_valid(range)
valid == true
hmm_range_fault(range)
hmm_invalidate_range_start()
range->valid = false
hmm_invalidate_range_end()
range->valid = true
hmm_range_valid(range)
valid == true
Where the hmm_range_valid() should not have succeeded.
Adding the required sequence count would make it nearly identical to the
new mmu_interval_notifier. Instead replace the hmm_mirror stuff with
mmu_interval_notifier.
Co-existence of the two APIs is the first step.
Link: https://lore.kernel.org/r/20191112202231.3856-4-jgg@ziepe.ca
Reviewed-by: Jérôme Glisse <jglisse@redhat.com>
Tested-by: Philip Yang <Philip.Yang@amd.com>
Tested-by: Ralph Campbell <rcampbell@nvidia.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'fs/utimes.c')
0 files changed, 0 insertions, 0 deletions