xen/sched: fix locking in restore_vcpu_affinity()
authorJuergen Gross <jgross@suse.com>
Tue, 23 Jul 2019 09:20:55 +0000 (11:20 +0200)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 23 Jul 2019 11:46:58 +0000 (12:46 +0100)
commit0d10a77cc98dda1b8f9a96954149a872f46048c9
tree381b005d92cec162edf53622ad8bf13acd354aef
parentc21df76199aba0d2a6654d56c8e93e31c1f03975
xen/sched: fix locking in restore_vcpu_affinity()

Commit 0763cd2687897b55e7 ("xen/sched: don't disable scheduler on cpus
during suspend") removed a lock in restore_vcpu_affinity() which needs
to stay: cpumask_scratch_cpu() must be protected by the scheduler
lock. restore_vcpu_affinity() is being called by thaw_domains(), so
with multiple domains in the system another domain might already be
running and the scheduler might make use of cpumask_scratch_cpu()
already.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Dario Faggioli <dfaggioli@suse.com>
xen/common/schedule.c