public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Andrew Honig <ahonig@google.com>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: [PATCHv2] KVM: x86: Fix memory leak in vmx.c
Date: Thu, 18 Apr 2013 11:50:37 +0300	[thread overview]
Message-ID: <20130418085037.GN8997@redhat.com> (raw)
In-Reply-To: <516FACB5.2040000@redhat.com>

On Thu, Apr 18, 2013 at 10:20:05AM +0200, Paolo Bonzini wrote:
> Il 18/04/2013 01:03, Andrew Honig ha scritto:
> > I don't have a significant objection to freeing the memory in
> > kvm_arch_free_memslot, although I think it's a little harder to
> > understand.  I like the idea of being symmetric (memory is allocated
> > by calling kvm_set_memory_region and freed using the same technique).
> > That way if someone changes from vm_mmap to something else it will be
> > obvious that they need to change both.
> > 
> > Also, it looks like your patch is based on something several commits
> > behind HEAD on virt/kvm/kvm.git,
> 
> Yeah, it was just whatever version I had checked out on the laptop. :)
> So that maintainers can look at both approaches and see what they prefer.
> 
> Gleb, Marcelo, wdyt?
> 
I agree with Andrew. Having kvm_arch_free_memslot() unmap memory,
but only for subset of memslots is not cleanest approach. Userspace
interface for slot deletion is to "create" the slot with zero size,
Andrew patch uses the same, well tested, code path.

--
			Gleb.

  reply	other threads:[~2013-04-18  8:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-17 17:54 [PATCHv2] KVM: x86: Fix memory leak in vmx.c Andrew Honig
2013-04-17 20:37 ` Eric Northup
2013-04-17 21:55 ` Paolo Bonzini
2013-04-17 23:03   ` Andrew Honig
2013-04-18  8:20     ` Paolo Bonzini
2013-04-18  8:50       ` Gleb Natapov [this message]
2013-04-18 10:21 ` Gleb Natapov

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=20130418085037.GN8997@redhat.com \
    --to=gleb@redhat.com \
    --cc=ahonig@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox