From: Sasha Levin <sasha.levin@oracle.com>
To: Will Deacon <will.deacon@arm.com>
Cc: andre.przywara@arm.com, josh@joshtriplett.org,
penberg@kernel.org, asias.hejun@gmail.com, kvm@vger.kernel.org
Subject: Re: [PATCH 2/2] kvmtool: assume dead vcpus are paused too
Date: Wed, 4 Nov 2015 18:51:12 -0500 [thread overview]
Message-ID: <563A99F0.10100@oracle.com> (raw)
In-Reply-To: <20151104115112.GE5405@arm.com>
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?
Thanks,
Sasha
next prev parent reply other threads:[~2015-11-04 23:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1445265650-25616-1-git-send-email-sasha.levin@oracle.com>
[not found] ` <1445265650-25616-2-git-send-email-sasha.levin@oracle.com>
[not found] ` <20151027160802.GD20208@arm.com>
[not found] ` <56302E2C.2010207@oracle.com>
[not found] ` <20151028122745.GC29512@arm.com>
[not found] ` <5630C6D7.2020608@oracle.com>
[not found] ` <20151028133425.GB18966@arm.com>
2015-11-04 11:51 ` [PATCH 2/2] kvmtool: assume dead vcpus are paused too Will Deacon
2015-11-04 23:51 ` Sasha Levin [this message]
2015-11-05 14:41 ` Will Deacon
2015-11-05 16:02 ` Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=563A99F0.10100@oracle.com \
--to=sasha.levin@oracle.com \
--cc=andre.przywara@arm.com \
--cc=asias.hejun@gmail.com \
--cc=josh@joshtriplett.org \
--cc=kvm@vger.kernel.org \
--cc=penberg@kernel.org \
--cc=will.deacon@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.