Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+1 -1
+1 -1
security/selinux/hooks.c
··· 259 259 260 260 might_sleep_if(may_sleep); 261 261 262 - if (isec->initialized != LABEL_INITIALIZED) { 262 + if (ss_initialized && isec->initialized != LABEL_INITIALIZED) { 263 263 if (!may_sleep) 264 264 return -ECHILD; 265 265