From: Jan Kara <jack@suse.cz>
To: Zheng Liu <gnehzuil.liu@gmail.com>
Cc: Jan Kara <jack@suse.cz>,
linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org,
Zheng Liu <wenqing.lz@taobao.com>,
Al Viro <viro@zeniv.linux.org.uk>
Subject: Re: [PATCH] ext3: fix a bug when we try to open a file with O_TMPFILE flag
Date: Mon, 22 Jul 2013 15:18:08 +0200 [thread overview]
Message-ID: <20130722131808.GD23658@quack.suse.cz> (raw)
In-Reply-To: <20130722131406.GA2895@gmail.com>
On Mon 22-07-13 21:14:07, Zheng Liu wrote:
> Hi Jan,
>
> On Mon, Jul 22, 2013 at 03:07:37PM +0200, Jan Kara wrote:
> > On Sun 21-07-13 00:53:47, Zheng Liu wrote:
> > > From: Zheng Liu <wenqing.lz@taobao.com>
> > >
> > > When we try to open a file with O_TMPFILE flag, we will trigger a bug.
> > > The root cause is that in ext4_orphan_add() we check ->i_nlink == 0 and
> > > this check always fails because we set ->i_nlink = 1 in
> > > inode_init_always(). We can use the following program to trigger it:
> [...]
> > > Here we couldn't call clear_nlink() directly because in d_tmpfile() we
> > > will call inode_dec_link_count() to decrease ->i_nlink. So this commit
> > > tries to call d_tmpfile() before ext4_orphan_add() to fix this problem.
> > Thanks the patch looks good. I've added the patch to my tree and will
> > push it to Linus soon.
>
> Thanks for your review. Ted has pick it up and Linus has pulled the
> patch. Sorry, I forgot to remind you.
>
> http://www.gossamer-threads.com/lists/linux/kernel/1750649
Yeah, I've just noticed when I updated my tree. No problem.
Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
prev parent reply other threads:[~2013-07-22 13:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-20 16:53 [PATCH] ext3: fix a bug when we try to open a file with O_TMPFILE flag Zheng Liu
2013-07-22 13:07 ` Jan Kara
2013-07-22 13:14 ` Zheng Liu
2013-07-22 13:18 ` Jan Kara [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=20130722131808.GD23658@quack.suse.cz \
--to=jack@suse.cz \
--cc=gnehzuil.liu@gmail.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
--cc=wenqing.lz@taobao.com \
/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).