Commit b3c6761d authored by Eric W. Biederman's avatar Eric W. Biederman

userns: Allow the userns root to mount ramfs.

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: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
parent ec2aa8e8
...@@ -260,6 +260,7 @@ static struct file_system_type ramfs_fs_type = { ...@@ -260,6 +260,7 @@ static struct file_system_type ramfs_fs_type = {
.name = "ramfs", .name = "ramfs",
.mount = ramfs_mount, .mount = ramfs_mount,
.kill_sb = ramfs_kill_sb, .kill_sb = ramfs_kill_sb,
.fs_flags = FS_USERNS_MOUNT,
}; };
static struct file_system_type rootfs_fs_type = { static struct file_system_type rootfs_fs_type = {
.name = "rootfs", .name = "rootfs",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment