On 17/02/2016 20:14, Radim Krčmář wrote: > + /* pit->pit_state.lock was overloaded to prevent userspace from getting > + * an inconsistent state after running multiple KVM_REINJECT_CONTROL > + * ioctls in parallel. Use a separate lock if that ioctl isn't rare. > + */ > + mutex_lock(&pit->pit_state.lock); > + kvm_pit_set_reinject(pit, control->pit_reinject); > + mutex_unlock(&pit->pit_state.lock); ... so in patch 7 concurrent _writes_ of reinject are protected by the lock, but reads are done outside it (in pit_timer_fn). WDYT about making reinject an atomic_t? Paolo -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html