Re: [PATCH RESEND] userns: enable tmpfs support for user namespace

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Gao feng (gaofeng@xxxxxxxxxxxxxx):
> From: gaofeng <gaofeng@xxxxxxxxxxxxxx>
> 
> Since the memory used by tmpfs is under control of
> memory cgroup. and the files under the tmpfs will not
> be leak to other tmpfs.
> 
> So mounting tmpfs in user namespace does no harm to the
> host,we can allow tmpfs to be mounted in user namespace.
> 
> Signed-off-by: gaofeng <gaofeng@xxxxxxxxxxxxxx>

I've got the same patch in my kernel at
http://kernel.ubuntu.com/git?p=serge/quantal-userns.git;a=summary

except note that there are two definitions of shmem_fs_type.

> ---
>  mm/shmem.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/mm/shmem.c b/mm/shmem.c
> index 5dd56f6..8eff60a 100644
> --- a/mm/shmem.c
> +++ b/mm/shmem.c
> @@ -2766,6 +2766,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)
> -- 
> 1.7.11.7
> 
_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/containers


[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux