]> git.baikalelectronics.ru Git - kernel.git/commit
x86: vdso: fix pvclock races with task migration
authorRadim Krčmář <rkrcmar@redhat.com>
Thu, 2 Apr 2015 18:44:23 +0000 (20:44 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 8 Apr 2015 08:46:55 +0000 (10:46 +0200)
commitf23a44a5287a7dab6d63ad302e148bda3794deba
tree5046430395b6097984374f24d59f6616b34ae1ea
parentec0b11b03f2de3c032625746a47e802eb3c51932
x86: vdso: fix pvclock races with task migration

If we were migrated right after __getcpu, but before reading the
migration_count, we wouldn't notice that we read TSC of a different
VCPU, nor that KVM's bug made pvti invalid, as only migration_count
on source VCPU is increased.

Change vdso instead of updating migration_count on destination.

Cc: stable@vger.kernel.org
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Fixes: 525126035624 ("x86: kvm: Revert "remove sched notifier for cross-cpu migrations"")
Message-Id: <1428000263-11892-1-git-send-email-rkrcmar@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/vdso/vclock_gettime.c