ia64/xen-unstable

changeset 14422:2dbee4f1ee63

[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@jp.fujitsu.com>
author awilliam@xenbuild2.aw
date Tue Mar 20 09:24:02 2007 -0600 (2007-03-20)
parents e1d626bde5db
children c07b1dc6dc6d
files xen/arch/ia64/vmx/vmmu.c
line diff
     1.1 --- a/xen/arch/ia64/vmx/vmmu.c	Tue Mar 20 09:21:47 2007 -0600
     1.2 +++ b/xen/arch/ia64/vmx/vmmu.c	Tue Mar 20 09:24:02 2007 -0600
     1.3 @@ -161,6 +161,7 @@ static void free_domain_vhpt(struct vcpu
     1.4      if (v->arch.vhpt.hash) {
     1.5          page = virt_to_page(v->arch.vhpt.hash);
     1.6          free_domheap_pages(page, VCPU_VHPT_ORDER);
     1.7 +        v->arch.vhpt.hash = 0;
     1.8      }
     1.9  
    1.10      return;