diff options
Diffstat (limited to 'fs/sysfs/mount.c')
-rw-r--r-- | fs/sysfs/mount.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/sysfs/mount.c b/fs/sysfs/mount.c index 1c6ac6fcee9f..f3db82071cfb 100644 --- a/fs/sysfs/mount.c +++ b/fs/sysfs/mount.c | |||
@@ -40,6 +40,10 @@ static struct dentry *sysfs_mount(struct file_system_type *fs_type, | |||
40 | SYSFS_MAGIC, &new_sb, ns); | 40 | SYSFS_MAGIC, &new_sb, ns); |
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) | ||
44 | /* Userspace would break if executables appear on sysfs */ | ||
45 | root->d_sb->s_iflags |= SB_I_NOEXEC; | ||
46 | |||
43 | return root; | 47 | return root; |
44 | } | 48 | } |
45 | 49 | ||