Re: [PATCHv2] KVM: x86: Fix memory leak in vmx.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
--
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




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux