summaryrefslogtreecommitdiff
path: root/security/selinux/hooks.c
diff options
context:
space:
mode:
authorPaul Moore <paul@paul-moore.com>2016-03-28 15:16:53 -0400
committerPaul Moore <paul@paul-moore.com>2016-04-05 16:10:55 -0400
commit4b57d6bcd94034e2eb168bdec2474e3b2b848e44 (patch)
treebe44e587a3fa8aee2746367208a6faed4848a2f9 /security/selinux/hooks.c
parent899134f2f6e27dcae1fee12593c492577cc80987 (diff)
selinux: simply inode label states to INVALID and INITIALIZED
There really is no need for LABEL_MISSING as we really only care if the inode's label is INVALID or INITIALIZED. Also adjust the revalidate code to reload the label whenever the label is not INITIALIZED so we are less sensitive to label state in the future. Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r--security/selinux/hooks.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 65642be91644..dd1fbea37b78 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -259,7 +259,7 @@ static int __inode_security_revalidate(struct inode *inode,
might_sleep_if(may_sleep);
- if (isec->initialized == LABEL_INVALID) {
+ if (isec->initialized != LABEL_INITIALIZED) {
if (!may_sleep)
return -ECHILD;