KVM: Fix wallclock version writing race
commit0119618803088bf8be6f287fc0e160e4a08fbfa6
authorAvi Kivity <avi@redhat.com>
Tue, 4 May 2010 12:00:37 +0000 (4 15:00 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 5 Jul 2010 18:23:03 +0000 (5 11:23 -0700)
tree700da7866e20bcdb1be7d6e096bb45cf77b1d620
parente995b3b2f8e5447928c7754f0702f05cc75646f6
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