]> xenbits.xensource.com Git - xen.git/commit
sched/core: fix bug when moving a domain between cpupools
authorJeff Kubascik <jeff.kubascik@dornerworks.com>
Fri, 17 Apr 2020 07:27:21 +0000 (09:27 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 17 Apr 2020 07:27:21 +0000 (09:27 +0200)
commitee97008433f15e60478058c8ace514b939b6f862
tree9fb512ec3b5178ed5342ee76d3c066ba44134f7b
parenta48e1323f9aa29f1ffb95594671b73de6bd7c1d4
sched/core: fix bug when moving a domain between cpupools

For each UNIT, sched_set_affinity is called before unit->priv is updated
to the new cpupool private UNIT data structure. The issue is
sched_set_affinity will call the adjust_affinity method of the cpupool.
If defined, the new cpupool may use unit->priv (e.g. credit), which at
this point still references the old cpupool private UNIT data structure.

This change fixes the bug by moving the switch of unit->priv earler in
the function.

Signed-off-by: Jeff Kubascik <jeff.kubascik@dornerworks.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Acked-by: Dario Faggioli <dfaggioli@suse.com>
xen/common/sched/core.c