mirror of
https://github.com/torvalds/linux.git
synced 2024-12-29 06:12:08 +00:00
ima: Evaluate error in init_ima()
Evaluate error in init_ima() before register_blocking_lsm_notifier() and
return if not zero.
Cc: stable@vger.kernel.org # 5.3.x
Fixes: b169424551
("ima: use the lsm policy update notifier")
Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
Reviewed-by: James Morris <jamorris@linux.microsoft.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
This commit is contained in:
parent
6f1a1d103b
commit
e144d6b265
@ -792,6 +792,9 @@ static int __init init_ima(void)
|
||||
error = ima_init();
|
||||
}
|
||||
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
error = register_blocking_lsm_notifier(&ima_lsm_policy_notifier);
|
||||
if (error)
|
||||
pr_warn("Couldn't register LSM notifier, error %d\n", error);
|
||||
|
Loading…
Reference in New Issue
Block a user