diff options
author | Al Viro <viro@ZenIV.linux.org.uk> | 2008-04-19 15:33:56 -0400 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-04-27 11:21:46 -0400 |
commit | 66c0b394f08fd89236515c1c84485ea712a157be (patch) | |
tree | bb6e9e5c0d6297f93617d222ea11f3c134ccab99 /include/linux/kvm_host.h | |
parent | 960b3991698872f68f09d51f4c2794ad484fe1fd (diff) |
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: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'include/linux/kvm_host.h')
-rw-r--r-- | include/linux/kvm_host.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 4e16682ee8bb..398978972b7a 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -110,7 +110,6 @@ struct kvm { | |||
110 | KVM_PRIVATE_MEM_SLOTS]; | 110 | KVM_PRIVATE_MEM_SLOTS]; |
111 | struct kvm_vcpu *vcpus[KVM_MAX_VCPUS]; | 111 | struct kvm_vcpu *vcpus[KVM_MAX_VCPUS]; |
112 | struct list_head vm_list; | 112 | struct list_head vm_list; |
113 | struct file *filp; | ||
114 | struct kvm_io_bus mmio_bus; | 113 | struct kvm_io_bus mmio_bus; |
115 | struct kvm_io_bus pio_bus; | 114 | struct kvm_io_bus pio_bus; |
116 | struct kvm_vm_stat stat; | 115 | struct kvm_vm_stat stat; |