From: Pedro Scarapicchia Junior <pedro.scarapicchia@gmail.com>
To: Stefan Weil <weil@mail.berlios.de>
Cc: Stefan Hajnoczi <stefanha@gmail.com>,
Pedro Scarapicchia Junior <pedro.scarapiccha@br.flextronics.com>,
"Venkateswararao Jujjuri (JV)" <jvrao@linux.vnet.ibm.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] virtio-9p: Fix a memory leak
Date: Sat, 7 May 2011 17:27:14 -0300 [thread overview]
Message-ID: <BANLkTim=+60nM3U-CYt_=CzPchnePsM3UA@mail.gmail.com> (raw)
In-Reply-To: <4DC50954.4060601@mail.berlios.de>
[-- Attachment #1: Type: text/plain, Size: 1384 bytes --]
Hi Stefan,
Thanks for the comment.
I believe that it is possible to release the memory at v9fs_walk. However
v9fs_walk_complete() is called from two another
functions: v9fs_walk_post_newfid_lstat() and v9fs_walk_post_oldfid_lstat().
Placing qemu_free at end of v9fs_walk_complete() solve memory leak in both
cases.
Venkateswararao, what's your opinion?
Best regards,
Pedro
On Sat, May 7, 2011 at 5:56 AM, Stefan Weil <weil@mail.berlios.de> wrote:
> Am 07.05.2011 10:34, schrieb Stefan Hajnoczi:
>
> On Fri, May 6, 2011 at 8:05 PM, Pedro Scarapicchia Junior
>> <pedrinho.rep51@gmail.com> wrote:
>>
>>> At v9fs_walk_complete(), the memory allocated at v9fs_walk() is not being
>>> released leading system to crash due out of memory.
>>>
>>> This patch releases structure V9fsWalkState after v9fs_walk is complete.
>>>
>>> Signed-off-by: Pedro Scarapicchia Junior <
>>> pedro.scarapiccha@br.flextronics.com>
>>> ---
>>> hw/9pfs/virtio-9p.c | 2 ++
>>> 1 files changed, 2 insertions(+), 0 deletions(-)
>>>
>>
>> Thanks for this patch. I suggest CCing Venkateswararao Jujjuri (JV)
>> <jvrao@linux.vnet.ibm.com>, the virtio-9p maintainer (see MAINTAINERS
>> file), on future patches so he can pick them up quickly.
>>
>> Stefan
>>
>
> Releasing the memory in v9fs_walk() were it was allocated
> would be cleaner and easier to review. Is this not possible?
>
> Stefan W.
>
>
>
[-- Attachment #2: Type: text/html, Size: 2348 bytes --]
next prev parent reply other threads:[~2011-05-07 20:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-06 19:05 [Qemu-devel] [PATCH] virtio-9p: Fix a memory leak Pedro Scarapicchia Junior
2011-05-07 8:34 ` Stefan Hajnoczi
2011-05-07 8:56 ` Stefan Weil
2011-05-07 20:27 ` Pedro Scarapicchia Junior [this message]
2011-05-08 17:40 ` Venkateswararao Jujjuri
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='BANLkTim=+60nM3U-CYt_=CzPchnePsM3UA@mail.gmail.com' \
--to=pedro.scarapicchia@gmail.com \
--cc=jvrao@linux.vnet.ibm.com \
--cc=pedro.scarapiccha@br.flextronics.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
--cc=weil@mail.berlios.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).