aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux
diff options
context:
space:
mode:
Diffstat (limited to 'security/selinux')
-rw-r--r--security/selinux/selinuxfs.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c
index ab7c9935c29a..f321c0c49f46 100644
--- a/security/selinux/selinuxfs.c
+++ b/security/selinux/selinuxfs.c
@@ -1151,22 +1151,19 @@ static int sel_make_avc_files(struct dentry *dir)
1151 dentry = d_alloc_name(dir, files[i].name); 1151 dentry = d_alloc_name(dir, files[i].name);
1152 if (!dentry) { 1152 if (!dentry) {
1153 ret = -ENOMEM; 1153 ret = -ENOMEM;
1154 goto err; 1154 goto out;
1155 } 1155 }
1156 1156
1157 inode = sel_make_inode(dir->d_sb, S_IFREG|files[i].mode); 1157 inode = sel_make_inode(dir->d_sb, S_IFREG|files[i].mode);
1158 if (!inode) { 1158 if (!inode) {
1159 ret = -ENOMEM; 1159 ret = -ENOMEM;
1160 goto err; 1160 goto out;
1161 } 1161 }
1162 inode->i_fop = files[i].ops; 1162 inode->i_fop = files[i].ops;
1163 d_add(dentry, inode); 1163 d_add(dentry, inode);
1164 } 1164 }
1165out: 1165out:
1166 return ret; 1166 return ret;
1167err:
1168 d_genocide(dir);
1169 goto out;
1170} 1167}
1171 1168
1172static int sel_make_dir(struct super_block *sb, struct dentry *dentry) 1169static int sel_make_dir(struct super_block *sb, struct dentry *dentry)