[xen stable-4.10] x86/msr: Free msr_vcpu_policy during vcpu destruction

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[xen stable-4.10] x86/msr: Free msr_vcpu_policy during vcpu destruction

patchbot
commit a87ec4833af47cdd166294f3f4db21231930d65d
Author:     Andrew Cooper <[hidden email]>
AuthorDate: Thu Jan 4 14:32:01 2018 +0100
Commit:     Jan Beulich <[hidden email]>
CommitDate: Thu Jan 4 14:32:01 2018 +0100

    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 <[hidden email]>
    Reviewed-by: Jan Beulich <[hidden email]>
    master commit: e204e60f77702bf5c884dd37c3f1b01f14e396ae
    master date: 2018-01-04 14:27:38 +0100
---
 xen/arch/x86/domain.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index 735f45c..b44c95b 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);
 
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.10

_______________________________________________
Xen-changelog mailing list
[hidden email]
https://lists.xenproject.org/xen-changelog