cpu: sync any remaining RCU callbacks before CPU up/down
authorIgor Druzhinin <igor.druzhinin@citrix.com>
Thu, 26 Mar 2020 11:49:42 +0000 (12:49 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 26 Mar 2020 11:49:42 +0000 (12:49 +0100)
commit540d4d60378ca8ded405c19a38d4dcce61e3462e
tree056fa5f34c06aa651666ccbe2c4ecf8153404db1
parenta6fe79a5979a64c86ed5e60715ddfe5090bf1963
cpu: sync any remaining RCU callbacks before CPU up/down

During CPU down operation RCU callbacks are scheduled to finish
off some actions later as soon as CPU is fully dead (the same applies
to CPU up operation in case error path is taken). If in the same grace
period another CPU up operation is performed on the same CPU, RCU callback
will be called later on a CPU in a potentially wrong (already up again
instead of still being down) state leading to eventual state inconsistency
and/or crash.

In order to avoid it - flush RCU callbacks explicitly before starting the
next CPU up/down operation.

Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/acpi/power.c
xen/arch/x86/sysctl.c
xen/common/cpu.c