[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20140109223127.GM10323@ZenIV.linux.org.uk>
Date: Thu, 9 Jan 2014 22:31:27 +0000
From: Al Viro <viro@...IV.linux.org.uk>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Matthew Wilcox <matthew@....cx>,
LKML <linux-kernel@...r.kernel.org>,
linux-fsdevel@...r.kernel.org, Stephen Smalley <sds@...ho.nsa.gov>,
Christoph Hellwig <hch@...radead.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Eric Paris <eparis@...isplace.org>,
Theodore Ts'o <tytso@....edu>,
Dave Chinner <david@...morbit.com>,
James Morris <james.l.morris@...cle.com>,
Paul Moore <paul@...l-moore.com>,
Andrew Morton <akpm@...ux-foundation.org>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
stable <stable@...r.kernel.org>
Subject: Re: [PATCH] vfs: Fix possible NULL pointer dereference in
inode_permission()
On Thu, Jan 09, 2014 at 04:50:12PM -0500, Steven Rostedt wrote:
> > We'd then have to get rid of all the call_rcu() invocations in individual
> > filesystems' destroy_inode methods, but that doesn't sound like a bad
> > thing to me.
Check what e.g. XFS is doing...
> Which is another reason that I didn't do it, as I didn't know all the
> happenings inside the ->destroy_inode() calls. But yeah, I agree with
> this.
>
> Also, can iput() sleep? If not then we are OK. Otherwise, we need to be
> careful about any mutex being grabbed in those call backs, as the
> rcu_callback can't sleep either.
iput() definitely can sleep (that's when actual truncation and inode
freeing is done for opened-and-unlinked files - on the final iput() after
close()), but that' irrelevant here - fsnotify_delete_inode() grabs
a bunch of mutexes, which makes calling it from rcu callback no-go.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists