kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: Avi Kivity <avi@redhat.com>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH] KVM: MMU: Fix free memory accounting race in mmu_alloc_roots()
Date: Tue, 11 May 2010 14:10:21 -0300	[thread overview]
Message-ID: <20100511171021.GD9712@amt.cnet> (raw)
In-Reply-To: <1273482596-11311-1-git-send-email-avi@redhat.com>

On Mon, May 10, 2010 at 12:09:56PM +0300, Avi Kivity wrote:
> We drop the mmu lock between freeing memory and allocating the roots; this
> allows some other vcpu to sneak in and allocate memory.
> 
> While the race is benign (resulting only in temporary overallocation, not oom)
> it is simple and easy to fix by moving the freeing close to the allocation.
> 
> Signed-off-by: Avi Kivity <avi@redhat.com>
> ---
>  arch/x86/kvm/mmu.c |    5 ++---
>  1 files changed, 2 insertions(+), 3 deletions(-)

Applied, thanks.


      reply	other threads:[~2010-05-11 19:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-10  9:09 [PATCH] KVM: MMU: Fix free memory accounting race in mmu_alloc_roots() Avi Kivity
2010-05-11 17:10 ` Marcelo Tosatti [this message]

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=20100511171021.GD9712@amt.cnet \
    --to=mtosatti@redhat.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).