Patch "fix a braino in ovl_d_select_inode()" has been added to the 4.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx> know about it.


>From 9391dd00d13c853ab4f2a85435288ae2202e0e43 Mon Sep 17 00:00:00 2001
From: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
Date: Sun, 12 Jul 2015 10:39:45 -0400
Subject: fix a braino in ovl_d_select_inode()

From: Al Viro <viro@xxxxxxxxxxxxxxxxxx>

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@xxxxxxxxx>
Tested-By: Andrey Jr. Melnikov <temnota.am@xxxxxxxxx>
Signed-off-by: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
Cc: "Kamata, Munehisa" <kamatam@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
 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@xxxxxxxxxxxxxxxxxx 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
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]