From: Andrew Cooper Date: Thu, 4 Jan 2018 13:27:38 +0000 (+0100) Subject: x86/msr: Free msr_vcpu_policy during vcpu destruction X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~859 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=e204e60f77702bf5c884dd37c3f1b01f14e396ae;p=xen.git x86/msr: Free msr_vcpu_policy during vcpu destruction c/s 4187f79dc7 "x86/msr: introduce struct msr_vcpu_policy" introduced a per-vcpu memory allocation, but failed to free it in the clean vcpu destruction case. This is XSA-253. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c index b17468c54c..0ae715dbb2 100644 --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -382,6 +382,9 @@ void vcpu_destroy(struct vcpu *v) vcpu_destroy_fpu(v); + xfree(v->arch.msr); + v->arch.msr = NULL; + if ( !is_idle_domain(v->domain) ) vpmu_destroy(v);