From: <gregkh@linuxfoundation.org>
To: viro@zeniv.linux.org.uk, gregkh@linuxfoundation.org,
kamatam@amazon.com, temnota.am@gmail.com
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "fix a braino in ovl_d_select_inode()" has been added to the 4.1-stable tree
Date: Sat, 17 Oct 2015 17:34:34 -0700 [thread overview]
Message-ID: <1445128474104113@kroah.com> (raw)
This is a note to let you know that I've just added the patch titled
fix a braino in ovl_d_select_inode()
to the 4.1-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:
fix-a-braino-in-ovl_d_select_inode.patch
and it can be found in the queue-4.1 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 9391dd00d13c853ab4f2a85435288ae2202e0e43 Mon Sep 17 00:00:00 2001
From: Al Viro <viro@zeniv.linux.org.uk>
Date: Sun, 12 Jul 2015 10:39:45 -0400
Subject: fix a braino in ovl_d_select_inode()
From: Al Viro <viro@zeniv.linux.org.uk>
commit 9391dd00d13c853ab4f2a85435288ae2202e0e43 upstream.
when opening a directory we want the overlayfs inode, not one from
the topmost layer.
Reported-By: Andrey Jr. Melnikov <temnota.am@gmail.com>
Tested-By: Andrey Jr. Melnikov <temnota.am@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: "Kamata, Munehisa" <kamatam@amazon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/overlayfs/inode.c | 3 +++
1 file changed, 3 insertions(+)
--- a/fs/overlayfs/inode.c
+++ b/fs/overlayfs/inode.c
@@ -342,6 +342,9 @@ struct inode *ovl_d_select_inode(struct
struct path realpath;
enum ovl_path_type type;
+ if (d_is_dir(dentry))
+ return d_backing_inode(dentry);
+
type = ovl_path_real(dentry, &realpath);
if (ovl_open_need_copy_up(file_flags, type, realpath.dentry)) {
err = ovl_want_write(dentry);
Patches currently in stable-queue which might be from viro@zeniv.linux.org.uk are
queue-4.1/fix-a-braino-in-ovl_d_select_inode.patch
queue-4.1/dcache-handle-escaped-paths-in-prepend_path.patch
queue-4.1/overlay-call-ovl_drop_write-earlier-in-ovl_dentry_open.patch
queue-4.1/vfs-test-for-and-handle-paths-that-are-unreachable-from-their-mnt_root.patch
queue-4.1/namei-results-of-d_is_negative-should-be-checked-after-dentry-revalidation.patch
queue-4.1/overlayfs-make-f_path-always-point-to-the-overlay-and-f_inode-to-the-underlay.patch
reply other threads:[~2015-10-18 0:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1445128474104113@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=kamatam@amazon.com \
--cc=stable-commits@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=temnota.am@gmail.com \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).