Linux-EROFS Archive on lore.kernel.org
 help / color / Atom feed
From: Chengguang Xu <cgxu519@mykernel.net>
To: "Gao Xiang" <gaoxiang25@huawei.com>
Cc: miaoxie <miaoxie@huawei.com>, xiang <xiang@kernel.org>,
	linux-erofs <linux-erofs@lists.ozlabs.org>
Subject: Re: [PATCH] erofs: add error handling for erofs_fill_super()
Date: Wed, 20 Nov 2019 18:08:11 +0800
Message-ID: <16e88489ffe.10e665830795.7449424624832388952@mykernel.net> (raw)
In-Reply-To: <20191119125328.GA86789@architecture4>

 ---- 在 星期二, 2019-11-19 20:51:13 Gao Xiang <gaoxiang25@huawei.com> 撰写 ----
 > Hi Chengguang,
 > 
 > On Tue, Nov 19, 2019 at 07:37:44PM +0800, Chengguang Xu wrote:
 > > There are some potential resource leaks in error case
 > > of erofs_fill_super(), so add proper error handling
 > > for it.
 > > 
 > > Signed-off-by: Chengguang Xu <cgxu519@mykernel.net>
 > > ---
 > >  fs/erofs/super.c | 31 +++++++++++++++++++++++--------
 > >  1 file changed, 23 insertions(+), 8 deletions(-)
 > > 
 > > diff --git a/fs/erofs/super.c b/fs/erofs/super.c
 > > index 0e369494f2f2..06e721bd1c8c 100644
 > > --- a/fs/erofs/super.c
 > > +++ b/fs/erofs/super.c
 > > @@ -369,7 +369,7 @@ static int erofs_fill_super(struct super_block *sb, void *data, int silent)
 > >      sb->s_fs_info = sbi;
 > >      err = erofs_read_superblock(sb);
 > >      if (err)
 > > -        return err;
 > > +        goto free;
 > 
 > Could you give some hints what is the potential leak exactly?
 > Actually, it was modified on purpose recently, see the following threads:
 > https://lore.kernel.org/r/20190720224955.GD17978@ZenIV.linux.org.uk
 > and
 > https://lore.kernel.org/r/20190721040547.GF17978@ZenIV.linux.org.uk

Sorry, it seems I misread some part of code, please just drop the patch.

Thanks


      parent reply index

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-19 11:37 Chengguang Xu
2019-11-19 12:53 ` Gao Xiang
2019-11-20 10:08   ` Chengguang Xu
2019-11-20 10:08   ` Chengguang Xu [this message]

Reply instructions:

You may reply publically 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=16e88489ffe.10e665830795.7449424624832388952@mykernel.net \
    --to=cgxu519@mykernel.net \
    --cc=gaoxiang25@huawei.com \
    --cc=linux-erofs@lists.ozlabs.org \
    --cc=miaoxie@huawei.com \
    --cc=xiang@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

Linux-EROFS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-erofs/0 linux-erofs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-erofs linux-erofs/ https://lore.kernel.org/linux-erofs \
		linux-erofs@lists.ozlabs.org linux-erofs@ozlabs.org
	public-inbox-index linux-erofs

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.ozlabs.lists.linux-erofs


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git