From: "Krzysztof Błaszkowski" <kb@sysmikro.com.pl>
To: Christoph Hellwig <hch@infradead.org>
Cc: Carlos Maiolino <cmaiolino@redhat.com>, linux-fsdevel@vger.kernel.org
Subject: Re: freevxfs: hp-ux support. ( 1cce17017970c07) patchset 1/4
Date: Fri, 10 Jun 2016 16:46:43 +0200 [thread overview]
Message-ID: <1465570003.5573.22.camel@linux-q3cb.site> (raw)
In-Reply-To: <20160602082518.GB12071@infradead.org>
Christoph,
Here are these kfree()s.
>From e82e484492af7a66b25510718783529bad345cfc Mon Sep 17 00:00:00 2001
From: KB <kb@sysmikro.com.pl>
Date: Fri, 10 Jun 2016 09:52:19 +0200
Subject: [PATCH 1/4] vxfs_read_fshead() memory leak fixed
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
every successful mount two structs vxfs_fsh were not released
Signed-off-by: Krzysztof Błaszkowski <kb@sysmikro.com.pl>
---
fs/freevxfs/vxfs_fshead.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/freevxfs/vxfs_fshead.c b/fs/freevxfs/vxfs_fshead.c
index 69a10d6..a4610a7 100644
--- a/fs/freevxfs/vxfs_fshead.c
+++ b/fs/freevxfs/vxfs_fshead.c
@@ -172,6 +172,8 @@ vxfs_read_fshead(struct super_block *sbp)
goto out_iput_ilist;
}
+ kfree(pfp);
+ kfree(sfp);
return 0;
out_iput_ilist:
--
2.8.3
On Thu, 2016-06-02 at 01:25 -0700, Christoph Hellwig wrote:
> On Wed, Jun 01, 2016 at 11:23:32AM +0200, Krzysztof B??aszkowski wrote:
> > I think that there are no "kfree(pfp); kfree(sfp); return 0;" in
> > vxfs_read_fshead() still. Are pfp and sfp needed anywhere ? I am sure
> > they are not so there is a memory leak without these kfrees every mount.
> >
> > I am not sure absolutely of that read_fshead() is missing these kfrees
> > because I have seen just these diffs, anyway I did not notice "+kfree".
>
> The frees are still missing. Do you want to send me a patch for those?
>
> > needles to say that I prefer to have limited scope of visibility of
> > inode_cachep to the inode.c only.
>
> In my tree the visibility is in vxfs_super.c only. Given that the
> alloc/destroy methods are super operations that seems to fit better
> as they can have local scope, too.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Krzysztof Blaszkowski
next prev parent reply other threads:[~2016-06-10 14:46 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-26 14:45 freevxfs: hp-ux support. patchset 1-7/7 Krzysztof Błaszkowski
2016-05-26 15:43 ` freevxfs: hp-ux support. (working) " Krzysztof Błaszkowski
2016-05-26 15:53 ` r Christoph Hellwig
2016-05-26 17:44 ` r Krzysztof Błaszkowski
2016-05-28 19:40 ` freevxfs: hp-ux support. patchset 1-7/7 rev 2 Krzysztof Błaszkowski
2016-05-30 11:19 ` Carlos Maiolino
2016-05-30 11:54 ` Krzysztof Błaszkowski
2016-05-31 12:25 ` Christoph Hellwig
2016-05-31 13:44 ` Krzysztof Błaszkowski
2016-06-01 7:33 ` Christoph Hellwig
2016-06-01 8:38 ` Krzysztof Błaszkowski
2016-06-01 8:41 ` freevxfs: hp-ux support. patchset r3, 2/4 Krzysztof Błaszkowski
2016-06-01 8:42 ` freevxfs: hp-ux support. patchset r3 3/4 Krzysztof Błaszkowski
2016-06-02 8:32 ` Christoph Hellwig
2016-06-02 9:18 ` Krzysztof Błaszkowski
2016-06-01 8:43 ` freevxfs: hp-ux support. patchset r3 4/4 Krzysztof Błaszkowski
2016-06-01 9:23 ` freevxfs: hp-ux support. patchset 1-7/7 rev 2 Krzysztof Błaszkowski
2016-06-02 8:25 ` Christoph Hellwig
2016-06-02 9:16 ` Krzysztof Błaszkowski
2016-06-10 14:46 ` Krzysztof Błaszkowski [this message]
2016-06-01 9:27 ` Krzysztof Błaszkowski
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=1465570003.5573.22.camel@linux-q3cb.site \
--to=kb@sysmikro.com.pl \
--cc=cmaiolino@redhat.com \
--cc=hch@infradead.org \
--cc=linux-fsdevel@vger.kernel.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.