projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e52de1b
)
[PATCH] KVM: Initialize vcpu->kvm a little earlier
author
Avi Kivity
<
[email protected]
>
Sat, 6 Jan 2007 00:36:57 +0000
(16:36 -0800)
committer
Linus Torvalds
<
[email protected]
>
Sat, 6 Jan 2007 07:55:28 +0000
(23:55 -0800)
Fixes oops on early close of /dev/kvm.
Signed-off-by: Avi Kivity <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
drivers/kvm/kvm_main.c
patch
|
blob
|
history
diff --git
a/drivers/kvm/kvm_main.c
b/drivers/kvm/kvm_main.c
index 6e15aef6c34ffea51d2ff7aaddb4891eb0a09f48..a8b425284bd7f8176b6a2bcaf3fb8e2eb59c1844 100644
(file)
--- a/
drivers/kvm/kvm_main.c
+++ b/
drivers/kvm/kvm_main.c
@@
-230,6
+230,7
@@
static int kvm_dev_open(struct inode *inode, struct file *filp)
struct kvm_vcpu *vcpu = &kvm->vcpus[i];
mutex_init(&vcpu->mutex);
+ vcpu->kvm = kvm;
vcpu->mmu.root_hpa = INVALID_PAGE;
INIT_LIST_HEAD(&vcpu->free_pages);
}
@@
-530,7
+531,6
@@
static int kvm_dev_ioctl_create_vcpu(struct kvm *kvm, int n)
vcpu->guest_fx_image = vcpu->host_fx_image + FX_IMAGE_SIZE;
vcpu->cpu = -1; /* First load will set up TR */
- vcpu->kvm = kvm;
r = kvm_arch_ops->vcpu_create(vcpu);
if (r < 0)
goto out_free_vcpus;