mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 14:13:01 -04:00
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>
This commit is contained in:
parent
960b399169
commit
66c0b394f0
2 changed files with 6 additions and 7 deletions
|
|
@ -110,7 +110,6 @@ struct kvm {
|
|||
KVM_PRIVATE_MEM_SLOTS];
|
||||
struct kvm_vcpu *vcpus[KVM_MAX_VCPUS];
|
||||
struct list_head vm_list;
|
||||
struct file *filp;
|
||||
struct kvm_io_bus mmio_bus;
|
||||
struct kvm_io_bus pio_bus;
|
||||
struct kvm_vm_stat stat;
|
||||
|
|
|
|||
Loading…
Reference in a new issue