sched: always modify vcpu pause flags atomically
authorJuergen Gross <jgross@suse.com>
Fri, 8 May 2020 08:47:38 +0000 (10:47 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 8 May 2020 08:47:38 +0000 (10:47 +0200)
commite0d92d9bd7997c6bcda17a19aba4f3957dd1a2e9
tree6d2fb38889a956b0b5bb022a5f5c6208c4cd4a3c
parent498d73647fa17d9eb7a67d2e9bdccac6b438e559
sched: always modify vcpu pause flags atomically

credit2 is currently modifying the pause flags of vcpus non-atomically
via sched_set_pause_flags() and sched_clear_pause_flags(). This is
dangerous as there are cases where the paus flags are modified without
any lock held.

So drop the non-atomic pause flag modification functions and rename the
atomic ones dropping the _atomic suffix.

Fixes: a76255b4266516 ("xen/sched: make credit2 scheduler vcpu agnostic.")
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Dario Faggioli <dfaggioli@suse.com>
xen/common/sched/credit.c
xen/common/sched/private.h