diff options
| author | Paul Moore <paul@paul-moore.com> | 2016-04-18 16:41:38 -0400 |
|---|---|---|
| committer | Michael Bestas <mkbestas@lineageos.org> | 2022-04-19 00:52:02 +0300 |
| commit | 3139e1053fc923f44004632250107a8f980e6e38 (patch) | |
| tree | 1b528dd594286a05bf4508d55f2a6c9c72e27ac2 /security/selinux/hooks.c | |
| parent | 86720e523c7398a85ff0f33a94049075adac2825 (diff) | |
selinux: check ss_initialized before revalidating an inode label
There is no point in trying to revalidate an inode's security label if
the security server is not yet initialized.
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/selinux/hooks.c')
| -rw-r--r-- | security/selinux/hooks.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index b3d591ec452a..e92b42af18b1 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -260,7 +260,7 @@ static int __inode_security_revalidate(struct inode *inode, might_sleep_if(may_sleep); - if (isec->initialized != LABEL_INITIALIZED) { + if (ss_initialized && isec->initialized != LABEL_INITIALIZED) { if (!may_sleep) return -ECHILD; |
