]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/sysfs/mount.c
Merge branch 'for-4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup
[karo-tx-linux.git] / fs / sysfs / mount.c
index 1c6ac6fcee9fb15c869ef80fc5947ba9117d77ea..f3db82071cfbd5997bdb1393097e755ae730ea96 100644 (file)
@@ -40,6 +40,10 @@ static struct dentry *sysfs_mount(struct file_system_type *fs_type,
                                SYSFS_MAGIC, &new_sb, ns);
        if (IS_ERR(root) || !new_sb)
                kobj_ns_drop(KOBJ_NS_TYPE_NET, ns);
+       else if (new_sb)
+               /* Userspace would break if executables appear on sysfs */
+               root->d_sb->s_iflags |= SB_I_NOEXEC;
+
        return root;
 }