]> git.karo-electronics.de Git - karo-tx-linux.git/commit
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>
Sat, 18 Aug 2012 20:51:27 +0000 (16:51 -0400)
commit6a7e596644442db2f036ff556b3ec80547135ee2
tree47ed9f35d8f58d42f6e3c8614d355b1edc86f51b
parentd219e639700769ec45c6ab05bb6ee799b3e3f23b
vfio: get rid of vfio_device_put()/vfio_group_get_device* races

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.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
drivers/vfio/vfio.c