summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorRoberto Sassu <roberto.sassu@huawei.com>2023-03-10 09:54:00 +0100
committerPaul Moore <paul@paul-moore.com>2023-03-10 18:33:52 -0500
commitb7c1ae4bcc5b7e737b46d469959446afc76d3165 (patch)
treef8174e27e0813354bd78113a7e9addeac1bb7c37 /security
parent42994ee3cd7298b27698daa6848ed7168e72d056 (diff)
downloadlinux-b7c1ae4bcc5b7e737b46d469959446afc76d3165.tar.gz
Revert "integrity: double check iint_cache was initialized"
With the recent introduction of LSM_ORDER_LAST, the 'integrity' LSM is always initialized (if selected in the kernel configuration) and the iint_cache is always created (the kernel panics on error). Thus, the additional check of iint_cache in integrity_inode_get() is no longer necessary. If the 'integrity' LSM is not selected in the kernel configuration, integrity_inode_get() just returns NULL. This reverts commit 92063f3ca73aab794bd5408d3361fd5b5ea33079. Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com> Acked-by: Mimi Zohar <zohar@linux.ibm.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security')
-rw-r--r--security/integrity/iint.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/security/integrity/iint.c b/security/integrity/iint.c
index b97eb59e0e32..c73858e8c6d5 100644
--- a/security/integrity/iint.c
+++ b/security/integrity/iint.c
@@ -98,14 +98,6 @@ 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;