mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
userns: Allow the userns root to mount tmpfs.
There is no backing store to tmpfs and file creation rules are the same as for any other filesystem so it is semantically safe to allow unprivileged users to mount it. ramfs is safe for the same reasons so allow either flavor of tmpfs to be mounted by a user namespace root user. The memory control group successfully limits how much memory tmpfs can consume on any system that cares about a user namespace root using tmpfs to exhaust memory the memory control group can be deployed. Change-Id: Ie237fefe71aaa39172d661945197a20e6d0280eb Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
This commit is contained in:
parent
30ddc0def4
commit
6304999985
1 changed files with 2 additions and 0 deletions
|
@ -2875,6 +2875,7 @@ static struct file_system_type shmem_fs_type = {
|
|||
.name = "tmpfs",
|
||||
.mount = shmem_mount,
|
||||
.kill_sb = kill_litter_super,
|
||||
.fs_flags = FS_USERNS_MOUNT,
|
||||
};
|
||||
|
||||
int __init shmem_init(void)
|
||||
|
@ -2932,6 +2933,7 @@ static struct file_system_type shmem_fs_type = {
|
|||
.name = "tmpfs",
|
||||
.mount = ramfs_mount,
|
||||
.kill_sb = kill_litter_super,
|
||||
.fs_flags = FS_USERNS_MOUNT,
|
||||
};
|
||||
|
||||
int __init shmem_init(void)
|
||||
|
|
Loading…
Reference in a new issue