Skip to content

Commit 1ac4247

Browse files
committed
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 parent 20cdef8 commit 1ac4247

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

security/selinux/hooks.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ static int __inode_security_revalidate(struct inode *inode,
259259

260260
might_sleep_if(may_sleep);
261261

262-
if (isec->initialized != LABEL_INITIALIZED) {
262+
if (ss_initialized && isec->initialized != LABEL_INITIALIZED) {
263263
if (!may_sleep)
264264
return -ECHILD;
265265

0 commit comments

Comments
 (0)