From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] always assign userspace_addr Date: Thu, 20 Nov 2008 13:02:39 +0200 Message-ID: <492543CF.6040507@redhat.com> References: <1226977462-8086-1-git-send-email-glommer@redhat.com> <492436DE.2080906@codemonkey.ws> <20081119184357.GB25917@poweredge.glommer> <49246014.5000001@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Glauber Costa , linux-kernel@vger.kernel.org, kvm@vger.kernel.org To: Anthony Liguori Return-path: Received: from mx2.redhat.com ([66.187.237.31]:37110 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752995AbYKTLDD (ORCPT ); Thu, 20 Nov 2008 06:03:03 -0500 In-Reply-To: <49246014.5000001@codemonkey.ws> Sender: kvm-owner@vger.kernel.org List-ID: Anthony Liguori wrote: > > That's not how I read the code. I see: > >> >> static void kvm_free_physmem_slot(struct kvm_memory_slot *free, >> struct kvm_memory_slot *dont) >> { >> if (!dont || free->rmap != dont->rmap) >> vfree(free->rmap); > > And it's called as kvm_free_physmem_slot(&old, &new); > > new is assigned to old to start out with so old.rmap will equal new.rmap. > Hm, if !npages we should just kvm_free_physmem_slot(&old, NULL). -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.