diff options
author | Radim Krčmář <rkrcmar@redhat.com> | 2015-07-01 15:31:49 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2015-07-03 18:55:17 +0200 |
commit | 42720138b06301cc8a7ee8a495a6d021c4b6a9bc (patch) | |
tree | fbffa8a4feceef419b8d1f56cd521148095a8ba5 /arch/x86/include/asm/kvm_host.h | |
parent | 2ecd9d29abb171d6e97a4f3eb29d7456a11401b7 (diff) | |
download | lwn-42720138b06301cc8a7ee8a495a6d021c4b6a9bc.tar.gz lwn-42720138b06301cc8a7ee8a495a6d021c4b6a9bc.zip |
KVM: x86: make vapics_in_nmi_mode atomic
Writes were a bit racy, but hard to turn into a bug at the same time.
(Particularly because modern Linux doesn't use this feature anymore.)
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
[Actually the next patch makes it much, much easier to trigger the race
so I'm including this one for stable@ as well. - Paolo]
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/include/asm/kvm_host.h')
-rw-r--r-- | arch/x86/include/asm/kvm_host.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index c7fa57b529d2..2a7f5d782c33 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h @@ -607,7 +607,7 @@ struct kvm_arch { struct kvm_pic *vpic; struct kvm_ioapic *vioapic; struct kvm_pit *vpit; - int vapics_in_nmi_mode; + atomic_t vapics_in_nmi_mode; struct mutex apic_map_lock; struct kvm_apic_map *apic_map; |