From: Paul Moore Date: Mon, 18 Apr 2016 20:41:38 +0000 (-0400) Subject: selinux: check ss_initialized before revalidating an inode label X-Git-Tag: v4.7-rc1~124^2~1^2~2 X-Git-Url: http://git.cascardo.eti.br/?a=commitdiff_plain;h=1ac42476263eec99fb2d3c31ee946cb44e80ddd5;p=cascardo%2Flinux.git 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 --- diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index b09aad7ad423..474011c46bbd 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_INITIALIZED) { + if (ss_initialized && isec->initialized != LABEL_INITIALIZED) { if (!may_sleep) return -ECHILD;