[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen staging-4.11] sched: fix freeing per-vcpu data in sched_move_domain()



commit b0d4cecf5fca466557a9681d3565644f1398f433
Author:     Juergen Gross <jgross@xxxxxxxx>
AuthorDate: Fri Oct 25 11:57:24 2019 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Fri Oct 25 11:57:24 2019 +0200

    sched: fix freeing per-vcpu data in sched_move_domain()
    
    In case of an allocation error of per-vcpu data in sched_move_domain()
    the already allocated data is freed just using xfree(). This is wrong
    as some schedulers need to do additional operations (e.g. the arinc653
    scheduler needs to remove the vcpu-data from a list).
    
    So instead xfree() make use of the sched_free_vdata() hook.
    
    Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
    Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
    Reviewed-by: Dario Faggioli <dfaggioli@xxxxxxxx>
    master commit: b6656e6aa4dd5de537ce07ec16bfbbbb538b28b5
    master date: 2019-09-25 15:52:53 +0200
---
 xen/common/schedule.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/common/schedule.c b/xen/common/schedule.c
index 049f93f7aa..dd167cce76 100644
--- a/xen/common/schedule.c
+++ b/xen/common/schedule.c
@@ -337,7 +337,7 @@ int sched_move_domain(struct domain *d, struct cpupool *c)
         if ( vcpu_priv[v->vcpu_id] == NULL )
         {
             for_each_vcpu ( d, v )
-                xfree(vcpu_priv[v->vcpu_id]);
+                SCHED_OP(c->sched, free_vdata, vcpu_priv[v->vcpu_id]);
             xfree(vcpu_priv);
             sched_free_domdata(c->sched, domdata);
             return -ENOMEM;
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.11

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.