KVM: kill file->f_count abuse in kvm
authorAl Viro <viro@ZenIV.linux.org.uk>
Sat, 19 Apr 2008 19:33:56 +0000 (20:33 +0100)
committerAvi Kivity <avi@qumranet.com>
Sun, 27 Apr 2008 15:21:46 +0000 (18:21 +0300)
Use kvm own refcounting instead of playing with ->filp->f_count.
That will allow to get rid of a lot of crap in anon_inode_getfd() and
kill a race in kvm_dev_ioctl_create_vm() (file might have been closed
immediately by another thread, so ->filp might point to already freed
struct file when we get around to setting it).

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Avi Kivity <avi@qumranet.com>

No differences found