27 lines
837 B
Diff
27 lines
837 B
Diff
|
# Commit dad7e45bf44c0569546a3ed7d0fa4182a4a73f0a
|
||
|
# Date 2013-09-18 14:45:42 +0200
|
||
|
# Author George Dunlap <george.dunlap@eu.citrix.com>
|
||
|
# Committer Jan Beulich <jbeulich@suse.com>
|
||
|
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>
|
||
|
|
||
|
--- 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;
|