[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [IA64] Avoid double free of VHPT for HVM domain



# HG changeset patch
# User awilliam@xxxxxxxxxxxx
# Date 1174404242 21600
# Node ID 2dbee4f1ee633a69483290fb68e9f482f4ce4214
# Parent  e1d626bde5db9be3cc6741eaa3578a44e57622c9
[IA64] Avoid double free of VHPT for HVM domain

If vTLB area is not able to allocate with shortage of domheap,
Xen does a panic for double free of VHPT.

At first:
  vmx_final_setup_guest()
    -> init_domain_tlb()
         -> free_domain_vhpt()

At second:
  free_domain()
    -> vcpu_destroy()
         -> vmx_relinquish_vcpu_resources()
              -> free_domain_tlb()
                   -> free_domain_vhpt()

This patch avoids double free of VHPT by clearing v->arch.vhpt.hash
in free_domain_vhpt().

Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
---
 xen/arch/ia64/vmx/vmmu.c |    1 +
 1 files changed, 1 insertion(+)

diff -r e1d626bde5db -r 2dbee4f1ee63 xen/arch/ia64/vmx/vmmu.c
--- a/xen/arch/ia64/vmx/vmmu.c  Tue Mar 20 09:21:47 2007 -0600
+++ b/xen/arch/ia64/vmx/vmmu.c  Tue Mar 20 09:24:02 2007 -0600
@@ -161,6 +161,7 @@ static void free_domain_vhpt(struct vcpu
     if (v->arch.vhpt.hash) {
         page = virt_to_page(v->arch.vhpt.hash);
         free_domheap_pages(page, VCPU_VHPT_ORDER);
+        v->arch.vhpt.hash = 0;
     }
 
     return;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.