All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kouya Shimura <kouya@jp.fujitsu.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel@lists.xen.org
Subject: Re: [PATCH] x86/hap: Fix memory leak of domain->arch.hvm_domain.dirty_vram
Date: Thu, 29 Nov 2012 10:00:26 +0900	[thread overview]
Message-ID: <50B6B3AA.2080505@jp.fujitsu.com> (raw)
In-Reply-To: <50B5DBD702000078000AC021@nat28.tlf.novell.com>

On 11/28/2012 05:39 PM, Jan Beulich wrote:
>>>> On 28.11.12 at 07:51, Kouya Shimura <kouya@jp.fujitsu.com> wrote:
>> This patch fixes the memory leak of domain->arch.hvm_domain.dirty_vram.
>>
>> Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
>
> 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

  reply	other threads:[~2012-11-29  1:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50B6B3AA.2080505@jp.fujitsu.com \
    --to=kouya@jp.fujitsu.com \
    --cc=JBeulich@suse.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.