On 11/05/2015 09:41 AM, Will Deacon wrote: > On Wed, Nov 04, 2015 at 06:51:12PM -0500, Sasha Levin wrote: >> > On 11/04/2015 06:51 AM, Will Deacon wrote: >>> > > + mutex_lock(&pause_lock); >>> > > + >>> > > + /* The kvm->cpus array contains a null pointer in the last location */ >>> > > + for (i = 0; ; i++) { >>> > > + if (kvm->cpus[i]) >>> > > + pthread_kill(kvm->cpus[i]->thread, SIGKVMEXIT); >>> > > + else >>> > > + break; >>> > > + } >>> > > + >>> > > + kvm__continue(kvm); >> > >> > In this scenario: if we grabbed pause_lock, signaled vcpu0 to exit, and it did >> > before we called kvm__continue(), we won't end up releasing pause_lock, which >> > might cause a lockup later, no? > Hmm, yeah, maybe that should be an explicit mutex_unlock rather than a > call to kvm__continue. Yeah, that should do the trick. Thanks, Sasha -- 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