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

Re: [Xen-devel] [PATCH] x86/hap: Fix memory leak of domain->arch.hvm_domain.dirty_vram



On 11/28/2012 05:39 PM, Jan Beulich wrote:
On 28.11.12 at 07:51, Kouya Shimura <kouya@xxxxxxxxxxxxxx> wrote:
This patch fixes the memory leak of domain->arch.hvm_domain.dirty_vram.

Signed-off-by: Kouya Shimura <kouya@xxxxxxxxxxxxxx>

Wouldn't it be more consistent (and less redundant) to do this
through calling hap_track_dirty_vram(d, 0, 0, ...)? And even if
not, the conditional around the freeing/clearing is pointless.

Jan


From another point of view, it's consistent since it almost
copied from shadow_teardown()@xen/arch/x86/mm/shadow/common.c.
That is a sibling function of hap_teardown().
If it's not preferable, another cleanup patch should be made.

IMHO, I feel no good to remain a pointer to the freed memory
even though it never be dereferenced any more.
So it makes sense to check the pointer and set it NULL.

Thanks,
Kouya


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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.