[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140926202322.GA11829@ZenIV.linux.org.uk>
Date: Fri, 26 Sep 2014 21:23:22 +0100
From: Al Viro <viro@...IV.linux.org.uk>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Mikhail Efremov <sem@...linux.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Miklos Szeredi <mszeredi@...e.cz>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
stable <stable@...r.kernel.org>, Sage Weil <sage@...tank.com>
Subject: Re: [PATCH v2] vfs: Don't exchange "short" filenames unconditionally.
On Thu, Sep 25, 2014 at 05:46:01AM +0100, Al Viro wrote:
> I really wonder if it's possible to get d_rehash() hitting the victim of
> (non-exchange) __d_move(). _Then_ this patch (as well as the historical
> behaviour it restores, all way back to 2.5, if not 2.3) would, indeed,
> be buggy.
More fun: what's going on in ceph_handle_notrace_create()? AFAICS, this
struct dentry *result = ceph_lookup(dir, dentry, 0);
if (result && !IS_ERR(result)) {
/*
* We created the item, then did a lookup, and found
* it was already linked to another inode we already
* had in our cache (and thus got spliced). Link our
* dentry to that inode, but don't hash it, just in
* case the VFS wants to dereference it.
*/
BUG_ON(!result->d_inode);
d_instantiate(dentry, result->d_inode);
return 0;
}
is bogus. What will happen if server goes nuts and that existing alias picked
by lookup turns out to be a directory? And while we are at it, what's to
prevent a leak if we ever hit that codepath, directory or no directory?
Sage?
--
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