]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Nov 2020 18:22:04 +0000 (19:22 +0100)
commit0a444bd17a83cbf213e432dfe46bece9e37b6847
treec98cc07abd880f62c99e0e73190b532b7144bf9c
parent6b5164fc7104ec031ed6359acd9b1acaa6a36c51
vfio/pci: Implement ioeventfd thread handler for contended memory lock

[ Upstream commit 38565c93c8a1306dc5f245572a545fbea908ac41 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/vfio/pci/vfio_pci_rdwr.c