diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2015-05-08 23:22:29 -0500 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2015-05-13 21:44:11 -0500 |
commit | 1b852bceb0d111e510d1a15826ecc4a19358d512 (patch) | |
tree | b7a6b015d68f3ad25f79d7197690a29e08f0e21c /include/linux/fs.h | |
parent | 7e96c1b0e0f495c5a7450dc4aa7c9a24ba4305bd (diff) | |
download | linux-stable-1b852bceb0d111e510d1a15826ecc4a19358d512.tar.gz linux-stable-1b852bceb0d111e510d1a15826ecc4a19358d512.tar.bz2 linux-stable-1b852bceb0d111e510d1a15826ecc4a19358d512.zip |
mnt: Refactor the logic for mounting sysfs and proc in a user namespace
Fresh mounts of proc and sysfs are a very special case that works very
much like a bind mount. Unfortunately the current structure can not
preserve the MNT_LOCK... mount flags. Therefore refactor the logic
into a form that can be modified to preserve those lock bits.
Add a new filesystem flag FS_USERNS_VISIBLE that requires some mount
of the filesystem be fully visible in the current mount namespace,
before the filesystem may be mounted.
Move the logic for calling fs_fully_visible from proc and sysfs into
fs/namespace.c where it has greater access to mount namespace state.
Cc: stable@vger.kernel.org
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 35ec87e490b1..2d24eeb8e59c 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1897,6 +1897,7 @@ struct file_system_type { #define FS_HAS_SUBTYPE 4 #define FS_USERNS_MOUNT 8 /* Can be mounted by userns root */ #define FS_USERNS_DEV_MOUNT 16 /* A userns mount does not imply MNT_NODEV */ +#define FS_USERNS_VISIBLE 32 /* FS must already be visible */ #define FS_RENAME_DOES_D_MOVE 32768 /* FS will handle d_move() during rename() internally. */ struct dentry *(*mount) (struct file_system_type *, int, const char *, void *); @@ -1984,7 +1985,6 @@ extern int vfs_ustat(dev_t, struct kstatfs *); extern int freeze_super(struct super_block *super); extern int thaw_super(struct super_block *super); extern bool our_mnt(struct vfsmount *mnt); -extern bool fs_fully_visible(struct file_system_type *); extern int current_umask(void); |