* Patch "do_last(): ELOOP failure exit should be done after leaving RCU mode" has been added to the 4.4-stable tree
@ 2016-03-01 22:23 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-03-01 22:23 UTC (permalink / raw)
To: viro, gregkh; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
do_last(): ELOOP failure exit should be done after leaving RCU mode
to the 4.4-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:
do_last-eloop-failure-exit-should-be-done-after-leaving-rcu-mode.patch
and it can be found in the queue-4.4 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 5129fa482b16615fd4464d2f5d23acb1b7056c66 Mon Sep 17 00:00:00 2001
From: Al Viro <viro@zeniv.linux.org.uk>
Date: Sat, 27 Feb 2016 19:37:37 -0500
Subject: do_last(): ELOOP failure exit should be done after leaving RCU mode
From: Al Viro <viro@zeniv.linux.org.uk>
commit 5129fa482b16615fd4464d2f5d23acb1b7056c66 upstream.
... or we risk seeing a bogus value of d_is_symlink() there.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/namei.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -3149,11 +3149,6 @@ finish_lookup:
if (unlikely(error))
return error;
- if (unlikely(d_is_symlink(path.dentry)) && !(open_flag & O_PATH)) {
- path_to_nameidata(&path, nd);
- return -ELOOP;
- }
-
if ((nd->flags & LOOKUP_RCU) || nd->path.mnt != path.mnt) {
path_to_nameidata(&path, nd);
} else {
@@ -3172,6 +3167,10 @@ finish_open:
return error;
}
audit_inode(nd->name, nd->path.dentry, 0);
+ if (unlikely(d_is_symlink(nd->path.dentry)) && !(open_flag & O_PATH)) {
+ error = -ELOOP;
+ goto out;
+ }
error = -EISDIR;
if ((open_flag & O_CREAT) && d_is_dir(nd->path.dentry))
goto out;
Patches currently in stable-queue which might be from viro@zeniv.linux.org.uk are
queue-4.4/make-sure-that-freeing-shmem-fast-symlinks-is-rcu-delayed.patch
queue-4.4/do_last-eloop-failure-exit-should-be-done-after-leaving-rcu-mode.patch
queue-4.4/bcache-fix-a-leak-in-bch_cached_dev_run.patch
queue-4.4/do_last-don-t-let-a-bogus-return-value-from-open-et.al.-to-confuse-us.patch
queue-4.4/locks-fix-unlock-when-fcntl_setlk-races-with-a-close.patch
queue-4.4/namei-d_inode-of-a-pinned-dentry-is-stable-only-for-positives.patch
queue-4.4/should_follow_link-validate-d_seq-after-having-decided-to-follow.patch
queue-4.4/uml-fix-hostfs-mknod.patch
queue-4.4/hpfs-don-t-truncate-the-file-when-delete-fails.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-03-01 22:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-01 22:23 Patch "do_last(): ELOOP failure exit should be done after leaving RCU mode" has been added to the 4.4-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.