From: Tim Deegan Subject: Re: [PATCH] x86/hap: Fix memory leak of domain->arch.hvm_domain.dirty_vram Date: Thu, 29 Nov 2012 15:25:23 +0000 Message-ID: <20121129152523.GC80627@ocelot.phlegethon.org> References: <50B5B48C.7040804@jp.fujitsu.com> <50B5DBD702000078000AC021@nat28.tlf.novell.com> <50B6B3AA.2080505@jp.fujitsu.com> <50B71C5302000078000AC5CE@nat28.tlf.novell.com> <20121129110505.GA80627@ocelot.phlegethon.org> <50B76E3F02000078000AC7D8@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="x+6KMIRAuhnl3hBn" Return-path: Content-Disposition: inline In-Reply-To: <50B76E3F02000078000AC7D8@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: Kouya Shimura , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org --x+6KMIRAuhnl3hBn Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline At 13:16 +0000 on 29 Nov (1354194991), Jan Beulich wrote: > >>> On 29.11.12 at 12:05, Tim Deegan wrote: > > I have taken the conditional out but left it as an explicit free(). > > It might not always be safe to call hap_track_dirty_vram(), even for > > disabling, this late in the teardown. > > So is this something we also want to have on 4.2 and 4.1? Yes, I think so (after the customary delay). It applies OK to 4.2; a backport to 4.1 is attached. Tim. --x+6KMIRAuhnl3hBn Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: attachment; filename=y x86/hap: Fix memory leak of domain->arch.hvm_domain.dirty_vram Signed-off-by: Kouya Shimura Signed-off-by: Tim Deegan diff -r d89986111f0c xen/arch/x86/mm/hap/hap.c --- a/xen/arch/x86/mm/hap/hap.c Tue Nov 27 13:28:36 2012 +0100 +++ b/xen/arch/x86/mm/hap/hap.c Thu Nov 29 15:22:33 2012 +0000 @@ -686,6 +686,9 @@ void hap_teardown(struct domain *d) d->arch.paging.mode &= ~PG_log_dirty; + xfree(d->arch.hvm_domain.dirty_vram); + d->arch.hvm_domain.dirty_vram = NULL; + hap_unlock(d); } --x+6KMIRAuhnl3hBn Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --x+6KMIRAuhnl3hBn--