From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:45496 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751125AbcGKXWK (ORCPT ); Mon, 11 Jul 2016 19:22:10 -0400 Subject: Patch "mnt: fs_fully_visible test the proper mount for MNT_LOCKED" has been added to the 4.4-stable tree To: ebiederm@xmission.com, gregkh@linuxfoundation.org, seth.forshee@canonical.com Cc: , From: Date: Mon, 11 Jul 2016 15:47:52 -0700 Message-ID: <146827727231110@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: 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.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: mnt-fs_fully_visible-test-the-proper-mount-for-mnt_locked.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 know about it. >>From d71ed6c930ac7d8f88f3cef6624a7e826392d61f Mon Sep 17 00:00:00 2001 From: "Eric W. Biederman" 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 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") Reported-by: Seth Forshee Signed-off-by: "Eric W. Biederman" Signed-off-by: Greg Kroah-Hartman --- fs/namespace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/namespace.c +++ b/fs/namespace.c @@ -3262,7 +3262,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 ebiederm@xmission.com are queue-4.4/mnt-fs_fully_visible-test-the-proper-mount-for-mnt_locked.patch queue-4.4/mnt-if-fs_fully_visible-fails-call-put_filesystem.patch queue-4.4/mnt-account-for-ms_rdonly-in-fs_fully_visible.patch