1
0
Fork 0

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>
hifive-unleashed-5.1
Joerg Roedel 2009-02-25 16:08:31 +01:00 committed by Avi Kivity
parent 4cd481f68d
commit 7f1ea20896
1 changed files with 5 additions and 0 deletions

View File

@ -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);
}