From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kouya Shimura Subject: [PATCH] x86/hap: Fix memory leak of domain->arch.hvm_domain.dirty_vram Date: Wed, 28 Nov 2012 15:51:56 +0900 Message-ID: <50B5B48C.7040804@jp.fujitsu.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------050408040104060701000308" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org --------------050408040104060701000308 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit This patch fixes the memory leak of domain->arch.hvm_domain.dirty_vram. Signed-off-by: Kouya Shimura --------------050408040104060701000308 Content-Type: text/x-patch; name="fix_hap_leak.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="fix_hap_leak.patch" diff -r 0049de3827bc xen/arch/x86/mm/hap/hap.c --- a/xen/arch/x86/mm/hap/hap.c Fri Nov 23 11:06:15 2012 +0000 +++ b/xen/arch/x86/mm/hap/hap.c Wed Nov 28 15:21:32 2012 +0900 @@ -567,6 +567,12 @@ void hap_teardown(struct domain *d) d->arch.paging.mode &= ~PG_log_dirty; + if ( d->arch.hvm_domain.dirty_vram ) + { + xfree(d->arch.hvm_domain.dirty_vram); + d->arch.hvm_domain.dirty_vram = NULL; + } + paging_unlock(d); } --------------050408040104060701000308 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 --------------050408040104060701000308--