Skip to contentSkip to conversation

Patch "mnt: fs_fully_visible test the proper mount for MNT_LOCKED" has been added to the 4.6-stable tree

PATCH [email protected] 1 participant 1 message Jul 11, 2016

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

mnt: fs_fully_visible test the proper mount for MNT_LOCKED

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:
mnt-fs_fully_visible-test-the-proper-mount-for-mnt_locked.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 <[email protected]> know about it.

Quoted 1 line

From d71ed6c930ac7d8f88f3cef6624a7e826392d61f Mon Sep 17 00:00:00 2001

From: "Eric W. Biederman" <[email protected]>
Date: Fri, 27 May 2016 14:50:05 -0500
Subject: mnt: fs_fully_visible test the proper mount for MNT_LOCKED

From: Eric W. Biederman <[email protected]>

commit d71ed6c930ac7d8f88f3cef6624a7e826392d61f upstream.

MNT_LOCKED implies on a child mount implies the child is locked to the parent. So while looping through the children the children should be tested (not their parent).

Typically an unshare of a mount namespace locks all mounts together making both the parent and the slave as locked but there are a few corner cases where other things work.

Fixes ceeb0e5d39fc ("vfs: Ignore unlocked mounts in fs_fully_visible")
---
 fs/namespace.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/namespace.c +1 -1
@@ -3271,7 +3271,7 @@ static bool fs_fully_visible(struct file
 		list_for_each_entry(child, &mnt->mnt_mounts, mnt_child) {
 			struct inode *inode = child->mnt_mountpoint->d_inode;
 			/* Only worry about locked mounts */
-			if (!(mnt_flags & MNT_LOCKED))
+			if (!(child->mnt.mnt_flags & MNT_LOCKED))
 				continue;
 			/* Is the directory permanetly empty? */
 			if (!is_empty_dir_inode(inode))

Patches currently in stable-queue which might be from [email protected] are

queue-4.6/mnt-fs_fully_visible-test-the-proper-mount-for-mnt_locked.patch queue-4.6/mnt-if-fs_fully_visible-fails-call-put_filesystem.patch queue-4.6/mnt-account-for-ms_rdonly-in-fs_fully_visible.patch