Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
[linux-2.6-microblaze.git] / security / integrity / iint.c
index 1d20003..0ba0184 100644 (file)
@@ -98,6 +98,14 @@ struct integrity_iint_cache *integrity_inode_get(struct inode *inode)
        struct rb_node *node, *parent = NULL;
        struct integrity_iint_cache *iint, *test_iint;
 
+       /*
+        * The integrity's "iint_cache" is initialized at security_init(),
+        * unless it is not included in the ordered list of LSMs enabled
+        * on the boot command line.
+        */
+       if (!iint_cache)
+               panic("%s: lsm=integrity required.\n", __func__);
+
        iint = integrity_iint_find(inode);
        if (iint)
                return iint;