]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
vfio: Rework group release notifier warning
authorAlex Williamson <alex.williamson@redhat.com>
Tue, 21 Mar 2017 19:19:09 +0000 (13:19 -0600)
committerAlex Williamson <alex.williamson@redhat.com>
Tue, 21 Mar 2017 19:19:09 +0000 (13:19 -0600)
commit65b1adebfe43c642dfe3b109edb5d992db5fbe72
tree9b25b876ed6279f05e6ed9d78ad66b47cc86a456
parent97da3854c526d3a6ee05c849c96e48d21527606c
vfio: Rework group release notifier warning

The intent of the original warning is make sure that the mdev vendor
driver has removed any group notifiers at the point where the group
is closed by the user.  Theoretically this would be through an
orderly shutdown where any devices are release prior to the group
release.  We can't always count on an orderly shutdown, the user can
close the group before the notifier can be removed or the user task
might be killed.  We'd like to add this sanity test when the group is
idle and the only references are from the devices within the group
themselves, but we don't have a good way to do that.  Instead check
both when the group itself is removed and when the group is opened.
A bit later than we'd prefer, but better than the current over
aggressive approach.

Fixes: ccd46dbae77d ("vfio: support notifier chain in vfio_group")
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Cc: <stable@vger.kernel.org> # v4.10
Cc: Jike Song <jike.song@intel.com>
drivers/vfio/vfio.c