]> git.baikalelectronics.ru Git - kernel.git/commit
vfio: grab vfio_device reference *before* exposing the sucker via fd_install()
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 18 Aug 2012 01:32:56 +0000 (21:32 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 22 Aug 2012 14:26:42 +0000 (10:26 -0400)
commitcf0e5c87f53a39ee31e11fdbb9261d9644436ac2
tree4f7921f9bc1976336afbbbf431450d1d247a6161
parent9a30c3f32d349e65aa7183256ecea0601395c100
vfio: grab vfio_device reference *before* exposing the sucker via fd_install()

It's not critical (anymore) since another thread closing the file will block
on ->device_lock before it gets to dropping the final reference, but it's
definitely cleaner that way...

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