Skip to content

Commit e144d6b

Browse files
robertosassumimizohar
authored andcommitted
ima: Evaluate error in init_ima()
Evaluate error in init_ima() before register_blocking_lsm_notifier() and return if not zero. Cc: [email protected] # 5.3.x Fixes: b169424 ("ima: use the lsm policy update notifier") Signed-off-by: Roberto Sassu <[email protected]> Reviewed-by: James Morris <[email protected]> Signed-off-by: Mimi Zohar <[email protected]>
1 parent 6f1a1d1 commit e144d6b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

security/integrity/ima/ima_main.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -792,6 +792,9 @@ static int __init init_ima(void)
792792
error = ima_init();
793793
}
794794

795+
if (error)
796+
return error;
797+
795798
error = register_blocking_lsm_notifier(&ima_lsm_policy_notifier);
796799
if (error)
797800
pr_warn("Couldn't register LSM notifier, error %d\n", error);

0 commit comments

Comments
 (0)