Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[PATCH] KVM: Initialize vcpu->kvm a little earlier

Fixes oops on early close of /dev/kvm.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Avi Kivity and committed by
Linus Torvalds
86a2b42e e52de1b8

+1 -1
+1 -1
drivers/kvm/kvm_main.c
··· 230 230 struct kvm_vcpu *vcpu = &kvm->vcpus[i]; 231 231 232 232 mutex_init(&vcpu->mutex); 233 + vcpu->kvm = kvm; 233 234 vcpu->mmu.root_hpa = INVALID_PAGE; 234 235 INIT_LIST_HEAD(&vcpu->free_pages); 235 236 } ··· 531 530 vcpu->guest_fx_image = vcpu->host_fx_image + FX_IMAGE_SIZE; 532 531 533 532 vcpu->cpu = -1; /* First load will set up TR */ 534 - vcpu->kvm = kvm; 535 533 r = kvm_arch_ops->vcpu_create(vcpu); 536 534 if (r < 0) 537 535 goto out_free_vcpus;