Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

vfio: Ignore sprurious notifies

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>

+3 -5
+3 -5
drivers/vfio/vfio.c
··· 510 510 struct device *dev = data; 511 511 512 512 /* 513 - * Need to go through a group_lock lookup to get a reference or 514 - * we risk racing a group being removed. Leave a WARN_ON for 515 - * debuging, but if the group no longer exists, a spurious notify 516 - * is harmless. 513 + * Need to go through a group_lock lookup to get a reference or we 514 + * risk racing a group being removed. Ignore spurious notifies. 517 515 */ 518 516 group = vfio_group_try_get(group); 519 - if (WARN_ON(!group)) 517 + if (!group) 520 518 return NOTIFY_OK; 521 519 522 520 switch (action) {