On Mon, May 17, 2021 at 11:46:35PM +0200, Thomas Hellström wrote: > Apart from the caching aliasing Mattew brought up, doesn't the > remap_pfn_range_xxx() family require the mmap_sem held in write mode since > it modifies the vma structure? remap_io_sg() is called from the fault > handler with the mmap_sem held in read mode only. Only for vma->vm_flags, and remap_sg already asserts all the interesting flags are set, although it does not assert VM_IO. We could move the assignment out of remap_pfn_range_notrack and into remap_pfn_range and just assert that the proper flags are set, though. _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx