aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2009-02-25 10:08:31 -0500
committerAvi Kivity <avi@redhat.com>2009-04-22 06:52:10 -0400
commit7f1ea208968f021943d4103ba59e06bb6d8239cb (patch)
tree1827ac4801b5b9c5bb69f921b60ab6747593beae /arch/x86
parent4cd481f68dde99ac416003b825c835f71e364393 (diff)
KVM: x86: release time_page on vcpu destruction
Not releasing the time_page causes a leak of that page or the compound page it is situated in. Cc: stable@kernel.org Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kvm/x86.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 8ca100a9eca..a1ecec5c03e 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -4159,6 +4159,11 @@ EXPORT_SYMBOL_GPL(kvm_put_guest_fpu);
4159 4159
4160void kvm_arch_vcpu_free(struct kvm_vcpu *vcpu) 4160void kvm_arch_vcpu_free(struct kvm_vcpu *vcpu)
4161{ 4161{
4162 if (vcpu->arch.time_page) {
4163 kvm_release_page_dirty(vcpu->arch.time_page);
4164 vcpu->arch.time_page = NULL;
4165 }
4166
4162 kvm_x86_ops->vcpu_free(vcpu); 4167 kvm_x86_ops->vcpu_free(vcpu);
4163} 4168}
4164 4169