diff --git a/xen/common/sched/cpupool.c b/xen/common/sched/cpupool.c index b7721b5d02..9f70c7ec17 100644 --- a/xen/common/sched/cpupool.c +++ b/xen/common/sched/cpupool.c @@ -466,7 +466,7 @@ static int cpupool_unassign_cpu_start(struct cpupool *c, unsigned int cpu) } rcu_read_unlock(&domlist_read_lock); if ( ret ) - goto out; + goto out_rcu; } cpupool_moving_cpu = cpu; atomic_inc(&c->refcnt); @@ -474,8 +474,9 @@ static int cpupool_unassign_cpu_start(struct cpupool *c, unsigned int cpu) cpumask_andnot(c->cpu_valid, c->cpu_valid, cpus); cpumask_and(c->res_valid, c->cpu_valid, &sched_res_mask); - rcu_read_unlock(&domlist_read_lock); -out: + out_rcu: + rcu_read_unlock(&sched_res_rculock); + out: spin_unlock(&cpupool_lock); return ret;