diff options
Diffstat (limited to 'fs/sysfs/mount.c')
-rw-r--r-- | fs/sysfs/mount.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/sysfs/mount.c b/fs/sysfs/mount.c index f3db82071cfb..20b8f82e115b 100644 --- a/fs/sysfs/mount.c +++ b/fs/sysfs/mount.c | |||
@@ -41,8 +41,7 @@ static struct dentry *sysfs_mount(struct file_system_type *fs_type, | |||
41 | if (IS_ERR(root) || !new_sb) | 41 | if (IS_ERR(root) || !new_sb) |
42 | kobj_ns_drop(KOBJ_NS_TYPE_NET, ns); | 42 | kobj_ns_drop(KOBJ_NS_TYPE_NET, ns); |
43 | else if (new_sb) | 43 | else if (new_sb) |
44 | /* Userspace would break if executables appear on sysfs */ | 44 | root->d_sb->s_iflags |= SB_I_USERNS_VISIBLE; |
45 | root->d_sb->s_iflags |= SB_I_NOEXEC; | ||
46 | 45 | ||
47 | return root; | 46 | return root; |
48 | } | 47 | } |
@@ -59,7 +58,7 @@ static struct file_system_type sysfs_fs_type = { | |||
59 | .name = "sysfs", | 58 | .name = "sysfs", |
60 | .mount = sysfs_mount, | 59 | .mount = sysfs_mount, |
61 | .kill_sb = sysfs_kill_sb, | 60 | .kill_sb = sysfs_kill_sb, |
62 | .fs_flags = FS_USERNS_VISIBLE | FS_USERNS_MOUNT, | 61 | .fs_flags = FS_USERNS_MOUNT, |
63 | }; | 62 | }; |
64 | 63 | ||
65 | int __init sysfs_init(void) | 64 | int __init sysfs_init(void) |