ia64/xen-unstable

changeset 13472:10dd3c907ca7

[IA64] Fix Xen crash when creating VTI domain

Xend will do a hypercall to destory domain when creating VTI guest fails.
If "is_vti" is not set at that point, HV will call relinquish_vcpu_resource(),
which is for non-VTI. It may try to free a NULL pointer, so dom0 crash.
This patch fix it.

Signed-off-by: Xu Anthony <Anthony.xu@intel.com>
Signed-off-by: Zhang Xin <xing.z.zhang@intel.com>
author awilliam@xenbuild2.aw
date Tue Jan 23 12:07:02 2007 -0700 (2007-01-23)
parents b59b6173455d
children 1487b2114fc2
files xen/arch/ia64/xen/vhpt.c
line diff
     1.1 --- a/xen/arch/ia64/xen/vhpt.c	Tue Jan 23 12:01:38 2007 -0700
     1.2 +++ b/xen/arch/ia64/xen/vhpt.c	Tue Jan 23 12:07:02 2007 -0700
     1.3 @@ -177,7 +177,9 @@ pervcpu_vhpt_alloc(struct vcpu *v)
     1.4  void
     1.5  pervcpu_vhpt_free(struct vcpu *v)
     1.6  {
     1.7 -	free_domheap_pages(v->arch.vhpt_page, VHPT_SIZE_LOG2 - PAGE_SHIFT);
     1.8 +	if (likely(v->arch.vhpt_page != NULL))
     1.9 +		free_domheap_pages(v->arch.vhpt_page,
    1.10 +		                   VHPT_SIZE_LOG2 - PAGE_SHIFT);
    1.11  }
    1.12  #endif
    1.13