All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Axel Lin <axel.lin@ingics.com>
Cc: Rob Landley <rob@landley.net>,
	Andrew Morton <akpm@linux-foundation.org>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ramfs: Fix memory leak on ramfs_fill_super error paths
Date: Thu, 14 Nov 2013 14:10:07 +0000	[thread overview]
Message-ID: <20131114141007.GH13318@ZenIV.linux.org.uk> (raw)
In-Reply-To: <1384412359.28992.3.camel@phoenix>

On Thu, Nov 14, 2013 at 02:59:19PM +0800, Axel Lin wrote:
> The memory leak was introduced by commit 318ceed0884
> "tidy up after d_make_root() conversion".

No memory leaks there.  Note that ->kill_sb() is called in *all*
cases, so that kfree() will be done by it just fine.

It's *not* ->put_super() - that would've been called only for superblocks
that had passed mount.  ->kill_sb() is called for *all* of them and
that often simplifies cleanup on failure exits quite nicely.

      parent reply	other threads:[~2013-11-14 14:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-14  6:59 [PATCH] ramfs: Fix memory leak on ramfs_fill_super error paths Axel Lin
2013-11-14 10:19 ` Kirill A. Shutemov
2013-11-14 14:10 ` Al Viro [this message]

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=20131114141007.GH13318@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=akpm@linux-foundation.org \
    --cc=axel.lin@ingics.com \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rob@landley.net \
    /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.