[Top] [All Lists]

Re: [PATCH] vfs: Fix possible NULL pointer dereference in inode_permissi

To: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
Subject: Re: [PATCH] vfs: Fix possible NULL pointer dereference in inode_permission()
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Fri, 10 Jan 2014 01:31:48 -0800
Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>, Eric Paris <eparis@xxxxxxxxxx>, Steven Rostedt <rostedt@xxxxxxxxxxx>, Paul McKenney <paulmck@xxxxxxxxxxxxxxxxxx>, Dave Chinner <david@xxxxxxxxxxxxx>, linux-fsdevel <linux-fsdevel@xxxxxxxxxxxxxxx>, James Morris <james.l.morris@xxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Stephen Smalley <sds@xxxxxxxxxxxxx>, Theodore Ts'o <tytso@xxxxxxx>, stable <stable@xxxxxxxxxxxxxxx>, Paul Moore <paul@xxxxxxxxxxxxxx>, LKML <linux-kernel@xxxxxxxxxxxxxxx>, Matthew Wilcox <matthew@xxxxxx>, xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20140110000642.GN10323@xxxxxxxxxxxxxxxxxx>
References: <20140109162731.12500986@xxxxxxxxxxxxxxxxxx> <20140109214239.GD29910@xxxxxxxxxxxxxxxx> <20140109165012.391db81e@xxxxxxxxxxxxxxxxxx> <20140109223127.GM10323@xxxxxxxxxxxxxxxxxx> <CA+55aFzCTPYEQCPnLBi1CwmMTocVqCFiCuJ391HkVx1CMw61ug@xxxxxxxxxxxxxx> <20140109182523.5b50131f@xxxxxxxxxxxxxxxxxx> <20140109182756.17abaaa8@xxxxxxxxxxxxxxxxxx> <1389310626.15209.92.camel@localhost> <CA+55aFzd2nw=JU4s0u=PJbATK0bwhm0kot3zRH=anLLT6THRFQ@xxxxxxxxxxxxxx> <20140110000642.GN10323@xxxxxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Fri, Jan 10, 2014 at 12:06:42AM +0000, Al Viro wrote:
> Check what XFS is doing ;-/  That's where those call_rcu() have come from.
> Sure, we can separate the simple "just do call_rcu(...->free_inode)" case
> and hit it whenever full ->free_inode is there and ->destroy_inode isn't.
> Not too pretty, but removal of tons of boilerplate might be worth doing
> that anyway.  But ->destroy_inode() is still needed for cases where fs
> has its own idea of inode lifetime rules.  Again, check what XFS is doing
> in that area...

Btw, I'd really love to get rid of the XFS ->destroy_inode abuse, it's
been a long time thorn in the flesh.

What's really needed there to make XFS behave more similar to everyone
else is a way for the filesystem to say: "I can't actually free this
inode right now, but I'll come back to you later".  That's what we
actually do right now, except we pretend that the VFS inode gets freed,
while its memory lives on (punt intended).

<Prev in Thread] Current Thread [Next in Thread>