summaryrefslogtreecommitdiffstats
path: root/security/selinux/hooks.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r--security/selinux/hooks.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index d1b141e33ecb..1c0721708ccc 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -237,6 +237,7 @@ static int inode_alloc_security(struct inode *inode)
237 isec->sid = SECINITSID_UNLABELED; 237 isec->sid = SECINITSID_UNLABELED;
238 isec->sclass = SECCLASS_FILE; 238 isec->sclass = SECCLASS_FILE;
239 isec->task_sid = sid; 239 isec->task_sid = sid;
240 isec->initialized = LABEL_INVALID;
240 inode->i_security = isec; 241 inode->i_security = isec;
241 242
242 return 0; 243 return 0;
@@ -247,7 +248,7 @@ static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dent
247/* 248/*
248 * Try reloading inode security labels that have been marked as invalid. The 249 * Try reloading inode security labels that have been marked as invalid. The
249 * @may_sleep parameter indicates when sleeping and thus reloading labels is 250 * @may_sleep parameter indicates when sleeping and thus reloading labels is
250 * allowed; when set to false, returns ERR_PTR(-ECHILD) when the label is 251 * allowed; when set to false, returns -ECHILD when the label is
251 * invalid. The @opt_dentry parameter should be set to a dentry of the inode; 252 * invalid. The @opt_dentry parameter should be set to a dentry of the inode;
252 * when no dentry is available, set it to NULL instead. 253 * when no dentry is available, set it to NULL instead.
253 */ 254 */