diff options
author | George Dunlap <george.dunlap@eu.citrix.com> | 2013-09-18 14:45:42 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2013-09-18 14:45:42 +0200 |
commit | dad7e45bf44c0569546a3ed7d0fa4182a4a73f0a (patch) | |
tree | 2e09d1c291b43f6e5c7ff350e54056f25a2274c8 /xen/arch/x86 | |
parent | 925fbcb7fdd6238f26b1576dc1f3e297f1f24f1e (diff) | |
download | xen-dad7e45bf44c0569546a3ed7d0fa4182a4a73f0a.tar.gz xen-dad7e45bf44c0569546a3ed7d0fa4182a4a73f0a.tar.bz2 xen-dad7e45bf44c0569546a3ed7d0fa4182a4a73f0a.zip |
VMX: fix failure path in construct_vmcs
If the allocation fails, make sure to call vmx_vmcs_exit().
This is a candidate for backport.
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Signed-off-by: Mukesh Rathor <mukesh.rathor@oracle.com>
Diffstat (limited to 'xen/arch/x86')
-rw-r--r-- | xen/arch/x86/hvm/vmx/vmcs.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/xen/arch/x86/hvm/vmx/vmcs.c b/xen/arch/x86/hvm/vmx/vmcs.c index 58d38b14a3..0be561689f 100644 --- a/xen/arch/x86/hvm/vmx/vmcs.c +++ b/xen/arch/x86/hvm/vmx/vmcs.c @@ -894,7 +894,10 @@ static int construct_vmcs(struct vcpu *v) unsigned long *msr_bitmap = alloc_xenheap_page(); if ( msr_bitmap == NULL ) + { + vmx_vmcs_exit(v); return -ENOMEM; + } memset(msr_bitmap, ~0, PAGE_SIZE); v->arch.hvm_vmx.msr_bitmap = msr_bitmap; |