userns: Allow the userns root to mount ramfs.
authorEric W. Biederman <ebiederm@xmission.com>
Sat, 26 Jan 2013 00:37:44 +0000 (16:37 -0800)
committerEric W. Biederman <ebiederm@xmission.com>
Sun, 27 Jan 2013 06:22:38 +0000 (22:22 -0800)
There is no backing store to ramfs and file creation
rules are the same as for any other filesystem so
it is semantically safe to allow unprivileged users
to mount it.

The memory control group successfully limits how much
memory ramfs can consume on any system that cares about
a user namespace root using ramfs to exhaust memory
the memory control group can be deployed.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
fs/ramfs/inode.c

index eab8c09d3801ca00db98687c49f22b58a633ccc8..c24f1e10b94695e13ba7c576e1e394f81ea43747 100644 (file)
@@ -260,6 +260,7 @@ static struct file_system_type ramfs_fs_type = {
        .name           = "ramfs",
        .mount          = ramfs_mount,
        .kill_sb        = ramfs_kill_sb,
+       .fs_flags       = FS_USERNS_MOUNT,
 };
 static struct file_system_type rootfs_fs_type = {
        .name           = "rootfs",