Re: [PATCH] vfs: fix race in rcu lookup of pruned dentry
Date: Tue Jul 19 2011 - 20:47:41 EST
On Wed, 20 Jul 2011 00:55:15 +0100 Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
> On Wed, Jul 20, 2011 at 12:52:16AM +0100, Al Viro wrote:
> > On Wed, Jul 20, 2011 at 12:45:51AM +0100, Al Viro wrote:
> > > You know what... I doubt that you want to mess with ->d_seq checks here.
> > > It's definitely not Hugh's bug (unless he has bindings somewhere odd) and
> > > both ->mnt_mountpoint and ->mnt_root are pinned (and we are holding
> > > vfsmount_lock anyway). *inode assignment too early is a real bug, indeed,
> > > and we want to assign nd->seq if we cross mountpoint as both versions do,
> > > but check just before that is, in the best case, BUG_ON() fodder. We'd
> > > just found a vfsmount with ->mnt_mountpoint equal to path->dentry; it *can't*
> > > be stale, or we have a really nasty problem anyway.
> > Kudos to neilb for spotting the pointless check, BTW; and no, his theory
> > that it might be needed since we could race with umount() is wrong - due to
> > vfsmount_lock being held.
Thanks.. but that patch seems to introduce an unused variable "seq".
> Updated, pushed. Please, pull from the usual place (
> git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6.git/ for-linus
> Al Viro (1):
> Fix cifs_get_root()
> Linus Torvalds (1):
> vfs: fix race in rcu lookup of pruned dentry
> fs/cifs/cifsfs.c | 100 +++++++++++++++--------------------------------------
> fs/namei.c | 10 +++++-
> 2 files changed, 38 insertions(+), 72 deletions(-)
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/