Skip to content

Commit b7c1ae4

Browse files
robertosassupcmoore
authored andcommitted
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 92063f3. 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>
1 parent 42994ee commit b7c1ae4

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

security/integrity/iint.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,6 @@ struct integrity_iint_cache *integrity_inode_get(struct inode *inode)
9898
struct rb_node *node, *parent = NULL;
9999
struct integrity_iint_cache *iint, *test_iint;
100100

101-
/*
102-
* The integrity's "iint_cache" is initialized at security_init(),
103-
* unless it is not included in the ordered list of LSMs enabled
104-
* on the boot command line.
105-
*/
106-
if (!iint_cache)
107-
panic("%s: lsm=integrity required.\n", __func__);
108-
109101
iint = integrity_iint_find(inode);
110102
if (iint)
111103
return iint;

0 commit comments

Comments
 (0)