KVM: Fix wallclock version writing race
authorAvi Kivity <avi@redhat.com>
Tue, 4 May 2010 12:00:37 +0000 (15:00 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 5 Jul 2010 18:11:19 +0000 (11:11 -0700)
commit0890bb8d955da47bd51bc823f5080ec0c2664b3f
tree17751d8a5e1418ef8e560168b321617eb0354e1b
parent4a277f9cb862ad44d3a83bfcc0cf42727de99ac3
KVM: Fix wallclock version writing race

Wallclock writing uses an unprotected global variable to hold the version;
this can cause one guest to interfere with another if both write their
wallclock at the same time.

Acked-by: Glauber Costa <glommer@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
(cherry picked from commit 9ed3c444ab8987c7b219173a2f7807e3f71e234e)
arch/x86/kvm/x86.c