lkml.org 
[lkml]   [2020]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3] vfio-pci: Invalidate mmaps and block MMIO access on disabled memory
On Tue, May 05, 2020 at 11:12:27AM -0600, Alex Williamson wrote:
>
> As noted in the comment, the fault handler can simply do:
>
> mutex_lock(&vdev->vma_lock);
> down_read(&vdev->memory_lock);
>
> This should be deadlock free now, so we can drop the retry handling

That does look like the right direction, because the memory_lock can
be done at the very end it means it doesn't need to be nested inside
mmap_sem

This is much cleaner!

Jason

\
 
 \ /
  Last update: 2020-05-05 20:36    [W:0.053 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site