From: Paolo Bonzini Date: Thu, 17 Jul 2014 10:25:16 +0000 (+0200) Subject: KVM: nVMX: fix lifetime issues for vmcs02 X-Git-Tag: v3.2.84~130 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bcad1c3975a8b59d2695c5f1dc85aba24330a51f;p=pandora-kernel.git KVM: nVMX: fix lifetime issues for vmcs02 commit 4fa7734c62cdd8c07edd54fa5a5e91482273071a upstream. free_nested needs the loaded_vmcs to be valid if it is a vmcs02, in order to detach it from the shadow vmcs. However, this is not available anymore after commit 26a865f4aa8e (KVM: VMX: fix use after free of vmx->loaded_vmcs, 2014-01-03). Revert that patch, and fix its problem by forcing a vmcs01 as the active VMCS before freeing all the nested VMX state. Reported-by: Wanpeng Li Tested-by: Wanpeng Li Signed-off-by: Paolo Bonzini Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed