]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - kernel/bpf/inode.c
bpf, inode: disallow userns mounts
[mirror_ubuntu-zesty-kernel.git] / kernel / bpf / inode.c
index 71b75d9c81da0db4786f5ecf03b1fb51cf670af3..318858edb1cd82b7d22294f44b3ee18d07613efd 100644 (file)
@@ -357,7 +357,7 @@ static int bpf_fill_super(struct super_block *sb, void *data, int silent)
 static struct dentry *bpf_mount(struct file_system_type *type, int flags,
                                const char *dev_name, void *data)
 {
-       return mount_ns(type, flags, current->nsproxy->mnt_ns, bpf_fill_super);
+       return mount_nodev(type, flags, data, bpf_fill_super);
 }
 
 static struct file_system_type bpf_fs_type = {
@@ -365,7 +365,6 @@ static struct file_system_type bpf_fs_type = {
        .name           = "bpf",
        .mount          = bpf_mount,
        .kill_sb        = kill_litter_super,
-       .fs_flags       = FS_USERNS_MOUNT,
 };
 
 MODULE_ALIAS_FS("bpf");