mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 06:09:23 -04:00
ima: Evaluate error in init_ima()
commit e144d6b265415ddbdc54b3f17f4f95133effa5a8 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
5f7272bd22
commit
4ce29d9b19
1 changed files with 3 additions and 0 deletions
|
|
@ -712,6 +712,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 a new issue