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>
unsigned int unit_p = new_p;
unitdata = unit->priv;
+ unit->priv = unit_priv[unit_idx];
for_each_sched_unit_vcpu ( unit, v )
{
*/
spin_unlock_irq(lock);
- unit->priv = unit_priv[unit_idx];
if ( !d->is_dying )
sched_move_irqs(unit);