APPLIED[C]: [bionic/master-next 1/1] UBUNTU: SAUCE: vfio -- release device lock before userspace requests

Seth Forshee seth.forshee at canonical.com
Wed Sep 12 12:12:03 UTC 2018


On Wed, Sep 12, 2018 at 09:50:46AM +0100, Andy Whitcroft wrote:
> During a hotplug event vfio_pci_remove() will call
> vfio_del_group_dev() to release the device group.  This may trigger
> a userspace request.  Currently this userspace request is performed
> while holding the device lock.  This leads userspace to deadlock
> against it while trying to perform the requested cleanup.
> 
> Drop the device lock while the userspace request is in flight.
> After it completes reaquire the lock and revalidate the device as
> it may have been successfully removed by a concurrent operation.
> As the remove callback may now drop the lock also check and
> revalidation at the end of that operation.
> 
> BugLink: http://bugs.launchpad.net/bugs/1792099
> Signed-off-by: Andy Whitcroft <apw at canonical.com>

Applied to cosmic/master-next, thanks!




More information about the kernel-team mailing list