vfio/pci: Implement ioeventfd thread handler for contended memory lock
authorAlex Williamson <alex.williamson@redhat.com>
Mon, 2 Nov 2020 22:02:00 +0000 (15:02 -0700)
committerAlex Williamson <alex.williamson@redhat.com>
Tue, 3 Nov 2020 18:07:40 +0000 (11:07 -0700)
commit38565c93c8a1306dc5f245572a545fbea908ac41
tree1411664b0374b6b9726259e95a9f2ca25a0896e7
parent8e91cb3812121aca8369d6c4e717ddd072280d0f
vfio/pci: Implement ioeventfd thread handler for contended memory lock

The ioeventfd is called under spinlock with interrupts disabled,
therefore if the memory lock is contended defer code that might
sleep to a thread context.

Fixes: bc93b9ae0151 ("vfio-pci: Avoid recursive read-lock usage")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=209253#c1
Reported-by: Ian Pilcher <arequipeno@gmail.com>
Tested-by: Ian Pilcher <arequipeno@gmail.com>
Tested-by: Justin Gatzen <justin.gatzen@gmail.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/pci/vfio_pci_rdwr.c