Commit 3f6caaf5 authored by Kees Cook's avatar Kees Cook Committed by James Morris

LSM: Don't ignore initialization failures

LSM initialization failures have traditionally been ignored. We should
at least WARN when something goes wrong.
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Reviewed-by: default avatarCasey Schaufler <casey@schaufler-ca.com>
Reviewed-by: default avatarJohn Johansen <john.johansen@canonical.com>
Signed-off-by: default avatarJames Morris <james.morris@microsoft.com>
parent 9b8c7c14
...@@ -55,10 +55,12 @@ static __initdata bool debug; ...@@ -55,10 +55,12 @@ static __initdata bool debug;
static void __init major_lsm_init(void) static void __init major_lsm_init(void)
{ {
struct lsm_info *lsm; struct lsm_info *lsm;
int ret;
for (lsm = __start_lsm_info; lsm < __end_lsm_info; lsm++) { for (lsm = __start_lsm_info; lsm < __end_lsm_info; lsm++) {
init_debug("initializing %s\n", lsm->name); init_debug("initializing %s\n", lsm->name);
lsm->init(); ret = lsm->init();
WARN(ret, "%s failed to initialize: %d\n", lsm->name, ret);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment