mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
mnt: fs_fully_visible test the proper mount for MNT_LOCKED
commitd71ed6c930upstream. 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:ceeb0e5d39("vfs: Ignore unlocked mounts in fs_fully_visible") Reported-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
67799eb4ab
commit
57eb6e3dbd
@@ -3262,7 +3262,7 @@ static bool fs_fully_visible(struct file_system_type *type, int *new_mnt_flags)
|
||||
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))
|
||||
|
||||
Reference in New Issue
Block a user