summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/i8254.h
diff options
context:
space:
mode:
authorRadim Krčmář <rkrcmar@redhat.com>2016-03-03 00:56:52 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2016-03-04 11:30:25 +0300
commita0aace5ac0efdb2bcb71e10d9c9ca6a851fa59f9 (patch)
treef91033e50e172a450daeff324a4dc9f1e880fa1f /arch/x86/kvm/i8254.h
parentab4c14763b434d48bc7732e475ff4d5b6b9d3e3b (diff)
downloadlinux-a0aace5ac0efdb2bcb71e10d9c9ca6a851fa59f9.tar.xz
KVM: i8254: turn kvm_kpit_state.reinject into atomic_t
Document possible races between readers and concurrent update to the ioctl. Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/i8254.h')
-rw-r--r--arch/x86/kvm/i8254.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/i8254.h b/arch/x86/kvm/i8254.h
index f365dce4fb8d..2f5af0798326 100644
--- a/arch/x86/kvm/i8254.h
+++ b/arch/x86/kvm/i8254.h
@@ -31,7 +31,7 @@ struct kvm_kpit_state {
u32 speaker_data_on;
struct mutex lock;
- bool reinject;
+ atomic_t reinject;
atomic_t pending; /* accumulated triggered timers */
atomic_t irq_ack;
struct kvm_irq_ack_notifier irq_ack_notifier;