diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2009-02-25 18:08:31 +0300 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-04-22 14:52:10 +0400 |
commit | 7f1ea208968f021943d4103ba59e06bb6d8239cb (patch) | |
tree | 1827ac4801b5b9c5bb69f921b60ab6747593beae /arch/x86/kvm | |
parent | 4cd481f68dde99ac416003b825c835f71e364393 (diff) | |
download | linux-7f1ea208968f021943d4103ba59e06bb6d8239cb.tar.xz |
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/kvm')
-rw-r--r-- | arch/x86/kvm/x86.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 8ca100a9ecac..a1ecec5c03e9 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -4159,6 +4159,11 @@ EXPORT_SYMBOL_GPL(kvm_put_guest_fpu); void kvm_arch_vcpu_free(struct kvm_vcpu *vcpu) { + if (vcpu->arch.time_page) { + kvm_release_page_dirty(vcpu->arch.time_page); + vcpu->arch.time_page = NULL; + } + kvm_x86_ops->vcpu_free(vcpu); } |