* Patch "autofs braino fix for do_last()" has been added to the 4.6-stable tree
@ 2016-07-11 22:48 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-07-11 22:48 UTC (permalink / raw)
To: viro, gregkh, raven; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
autofs braino fix for do_last()
to the 4.6-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
autofs-braino-fix-for-do_last.patch
and it can be found in the queue-4.6 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From e6ec03a25f12b312b7e0c037fe4a6471c4ee5665 Mon Sep 17 00:00:00 2001
From: Al Viro <viro@zeniv.linux.org.uk>
Date: Sun, 5 Jun 2016 00:23:09 -0400
Subject: autofs braino fix for do_last()
From: Al Viro <viro@zeniv.linux.org.uk>
commit e6ec03a25f12b312b7e0c037fe4a6471c4ee5665 upstream.
It's an analogue of commit 7500c38a (fix the braino in "namei:
massage lookup_slow() to be usable by lookup_one_len_unlocked()").
The same problem (->lookup()-returned unhashed negative dentry
just might be an autofs one with ->d_manage() that would wait
until the daemon makes it positive) applies in do_last() - we
need to do follow_managed() first.
Fortunately, remaining callers of follow_managed() are OK - only
autofs has that weirdness (negative dentry that does not mean
an instant -ENOENT)) and autofs never has its negative dentries
hashed, so we can't pick one from a dcache lookup.
->d_manage() is a bloody mess ;-/
Spotted-by: Ian Kent <raven@themaw.net>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/namei.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -3173,6 +3173,10 @@ retry_lookup:
got_write = false;
}
+ error = follow_managed(&path, nd);
+ if (unlikely(error < 0))
+ return error;
+
if (unlikely(d_is_negative(path.dentry))) {
path_to_nameidata(&path, nd);
return -ENOENT;
@@ -3188,10 +3192,6 @@ retry_lookup:
return -EEXIST;
}
- error = follow_managed(&path, nd);
- if (unlikely(error < 0))
- return error;
-
seq = 0; /* out of RCU mode, so the value doesn't matter */
inode = d_backing_inode(path.dentry);
finish_lookup:
Patches currently in stable-queue which might be from viro@zeniv.linux.org.uk are
queue-4.6/nfsd-check-permissions-when-setting-acls.patch
queue-4.6/autofs-braino-fix-for-do_last.patch
queue-4.6/make-nfs_atomic_open-call-d_drop-on-all-open_context-errors.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-07-11 23:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-11 22:48 Patch "autofs braino fix for do_last()" has been added to the 4.6-stable tree gregkh
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.