Skip to content
Commit 66c0b394 authored by Al Viro's avatar Al Viro Committed by Avi Kivity
Browse files

KVM: kill file->f_count abuse in kvm



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: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarAvi Kivity <avi@qumranet.com>
parent 960b3991
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment