From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Yang, Sheng" Subject: Re: [PATCH] Don't leak EPT identity page table Date: Thu, 1 May 2008 16:53:16 +0800 Message-ID: <200805011653.17405.sheng.yang@intel.com> References: <1209586565-913-1-git-send-email-aliguori@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel@lists.sourceforge.net, Avi Kivity To: Anthony Liguori Return-path: In-Reply-To: <1209586565-913-1-git-send-email-aliguori@us.ibm.com> Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces@lists.sourceforge.net Errors-To: kvm-devel-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org On Thursday 01 May 2008 04:16:05 Anthony Liguori wrote: > In vmx.c:alloc_identity_pagetable() we grab a reference to the EPT identity > page table via gfn_to_page(). We never release this reference though. > > This patch releases the reference to this page on VM destruction. I > haven't tested this with EPT. > > Signed-off-by: Anthony Liguori > > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > index 578a0c1..63f46cf 100644 > --- a/arch/x86/kvm/x86.c > +++ b/arch/x86/kvm/x86.c > @@ -3909,6 +3909,8 @@ void kvm_arch_destroy_vm(struct kvm *kvm) > kvm_free_physmem(kvm); > if (kvm->arch.apic_access_page) > put_page(kvm->arch.apic_access_page); > + if (kvm->arch.ept_identity_pagetable) > + put_page(kvm->arch.ept_identity_pagetable); > kfree(kvm); > } Um... I neglected that...Thanks for point it out! -- Thanks Yang, Sheng ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone