projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
kernfs: The cgroup filesystem also benefits from SB_I_NOEXEC
[cascardo/linux.git]
/
fs
/
kernfs
/
mount.c
diff --git
a/fs/kernfs/mount.c
b/fs/kernfs/mount.c
index
d90d574
..
1443df6
100644
(file)
--- a/
fs/kernfs/mount.c
+++ b/
fs/kernfs/mount.c
@@
-152,6
+152,8
@@
static int kernfs_fill_super(struct super_block *sb, unsigned long magic)
struct dentry *root;
info->sb = sb;
+ /* Userspace would break if executables appear on sysfs */
+ sb->s_iflags |= SB_I_NOEXEC;
sb->s_blocksize = PAGE_SIZE;
sb->s_blocksize_bits = PAGE_SHIFT;
sb->s_magic = magic;