[lkml]   [2021]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v2] vfio/pci: Handle concurrent vma faults
On Mon, Jun 28, 2021 at 10:46:53AM -0600, Alex Williamson wrote:
> On Wed, 10 Mar 2021 11:58:07 -0700
> Alex Williamson <> wrote:
> > vfio_pci_mmap_fault() incorrectly makes use of io_remap_pfn_range()
> > from within a vm_ops fault handler. This function will trigger a
> > BUG_ON if it encounters a populated pte within the remapped range,
> > where any fault is meant to populate the entire vma. Concurrent
> > inflight faults to the same vma will therefore hit this issue,
> > triggering traces such as:

If it is just about concurrancy can the vma_lock enclose
io_remap_pfn_range() ?

> IIRC, there were no blocking issues on this patch as an interim fix to
> resolve the concurrent fault issues with io_remap_pfn_range().
> Unfortunately it also got no Reviewed-by or Tested-by feedback. I'd
> like to put this in for v5.14 (should have gone in earlier). Any final
> comments? Thanks,

I assume there is a reason why vm_lock can't be used here, so I
wouldn't object, though I don't especially like the loss of tracking


 \ /
  Last update: 2021-06-28 19:31    [W:0.058 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site