From: Al Viro <viro@ZenIV.linux.org.uk>
To: Chunwei Chen <david.chen@osnexus.com>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH] vfs: check i_count under lock in evict_inodes
Date: Tue, 12 Jul 2016 01:46:23 +0100 [thread overview]
Message-ID: <20160712004623.GA14480@ZenIV.linux.org.uk> (raw)
In-Reply-To: <1468282504-2272-1-git-send-email-david.chen@osnexus.com>
On Mon, Jul 11, 2016 at 05:15:04PM -0700, Chunwei Chen wrote:
> We need to check i_count again with i_lock held, because iput might re-add
> i_count when lazytime is on. Without this check, we could end up with
> double-free or use-after-free.
Details, please. Ideally - with a reproducer. Who is calling that iput()
at that point of generic_shutdown_super() (has to be another thread) and
just what will happen if the same iput() is delayed until *after*
evict_inodes(), all the way into ->put_super(). At which point there's
no promise whatsoever that the data structures used by ->evict_inode()
hadn't been already freed...
next prev parent reply other threads:[~2016-07-12 0:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-12 0:15 [PATCH] vfs: check i_count under lock in evict_inodes Chunwei Chen
2016-07-12 0:46 ` Al Viro [this message]
2016-07-12 1:31 ` David Chen
2016-07-12 1:40 ` Christoph Hellwig
2016-07-12 5:26 ` Al Viro
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=20160712004623.GA14480@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=david.chen@osnexus.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@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 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).