From: Andrea Arcangeli <aarcange@redhat.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: kvm@vger.kernel.org, Avi Kivity <avi@redhat.com>
Subject: Re: KVM: protect concurrent make_all_cpus_request
Date: Wed, 17 Jun 2009 18:52:02 +0200 [thread overview]
Message-ID: <20090617165202.GD12816@random.random> (raw)
In-Reply-To: <20090617135347.GC14583@amt.cnet>
On Wed, Jun 17, 2009 at 10:53:47AM -0300, Marcelo Tosatti wrote:
>
>
> make_all_cpus_request contains a race condition which can
> trigger false request completed status, as follows:
>
> CPU0 CPU1
>
> if (test_and_set_bit(req,&vcpu->requests))
> .... if (test_and_set_bit(req,&vcpu->requests))
> .. return
> proceed to smp_call_function_many(wait=1)
>
> Use a spinlock to serialize concurrent CPUs.
Agreed, this is the safest...
next prev parent reply other threads:[~2009-06-17 16:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-17 13:53 KVM: protect concurrent make_all_cpus_request Marcelo Tosatti
2009-06-17 16:52 ` Andrea Arcangeli [this message]
2009-06-18 8:45 ` Avi Kivity
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=20090617165202.GD12816@random.random \
--to=aarcange@redhat.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.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.