sched: fix locking when allocating an RTDS pCPU
authorDario Faggioli <dario.faggioli@citrix.com>
Thu, 24 Mar 2016 14:56:56 +0000 (15:56 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 24 Mar 2016 14:56:56 +0000 (15:56 +0100)
commit8686d2a3f6fef8653580a649ec9c94e879eee35f
tree1d5aeee472fb0baa91e0e9e97c2b438cebac302c
parent803aea1dd801b7a2a084323151f681078e30b7f9
sched: fix locking when allocating an RTDS pCPU

as doing that include changing the scheduler lock
mapping for the pCPU itself, and the correct way
of doing that is:
 - take the lock that the pCPU is using right now
   (which may be the lock of another scheduler);
 - change the mapping of the lock to the RTDS one;
 - release the lock (the one that has actually been
   taken!)

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Reviewed-by: Meng Xu <mengxu@cis.upenn.edu>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
xen/common/sched_rt.c