diff --git a/fs/tracefs/inode.c b/fs/tracefs/inode.c index 8fbf8658644f..90ce45c8ecac 100644 --- a/fs/tracefs/inode.c +++ b/fs/tracefs/inode.c @@ -551,6 +551,9 @@ static struct dentry *__create_dir(const char *name, struct dentry *parent, */ struct dentry *tracefs_create_dir(const char *name, struct dentry *parent) { + if (security_locked_down(LOCKDOWN_TRACEFS)) + return NULL; + return __create_dir(name, parent, &simple_dir_inode_operations); }