All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/hap: Fix memory leak of domain->arch.hvm_domain.dirty_vram
@ 2012-11-28  6:51 Kouya Shimura
  2012-11-28  8:39 ` Jan Beulich
  0 siblings, 1 reply; 7+ messages in thread
From: Kouya Shimura @ 2012-11-28  6:51 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 125 bytes --]

This patch fixes the memory leak of domain->arch.hvm_domain.dirty_vram.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>

[-- Attachment #2: fix_hap_leak.patch --]
[-- Type: text/x-patch, Size: 457 bytes --]

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);
 }
 

[-- Attachment #3: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-11-29 15:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-28  6:51 [PATCH] x86/hap: Fix memory leak of domain->arch.hvm_domain.dirty_vram Kouya Shimura
2012-11-28  8:39 ` Jan Beulich
2012-11-29  1:00   ` Kouya Shimura
2012-11-29  7:26     ` Jan Beulich
2012-11-29 11:05       ` Tim Deegan
2012-11-29 13:16         ` Jan Beulich
2012-11-29 15:25           ` Tim Deegan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.