vfio: get rid of vfio_device_put()/vfio_group_get_device* races
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 18 Aug 2012 01:29:06 +0000 (21:29 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 22 Aug 2012 14:26:13 +0000 (10:26 -0400)
we really need to make sure that dropping the last reference happens
under the group->device_lock; otherwise a loop (under device_lock)
might find vfio_device instance that is being freed right now, has
already dropped the last reference and waits on device_lock to exclude
the sucker from the list.

Acked-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

No differences found