Skip to content

Commit

Permalink
vfio: Ignore sprurious notifies
Browse files Browse the repository at this point in the history
Remove debugging WARN_ON if we get a spurious notify for a group that
no longer exists.  No reports of anyone hitting this, but it would
likely be a race and not a bug if they did.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
  • Loading branch information
Alex Williamson committed Jul 24, 2013
1 parent de9c760 commit c640193
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions drivers/vfio/vfio.c
Original file line number Diff line number Diff line change
Expand Up @@ -510,13 +510,11 @@ static int vfio_iommu_group_notifier(struct notifier_block *nb,
struct device *dev = data;

/*
* Need to go through a group_lock lookup to get a reference or
* we risk racing a group being removed. Leave a WARN_ON for
* debuging, but if the group no longer exists, a spurious notify
* is harmless.
* Need to go through a group_lock lookup to get a reference or we
* risk racing a group being removed. Ignore spurious notifies.
*/
group = vfio_group_try_get(group);
if (WARN_ON(!group))
if (!group)
return NOTIFY_OK;

switch (action) {
Expand Down

0 comments on commit c640193

Please sign in to comment.