diff options
author | Kees Cook <keescook@chromium.org> | 2018-10-11 02:18:26 +0200 |
---|---|---|
committer | James Morris <james.morris@microsoft.com> | 2018-10-11 05:40:22 +0200 |
commit | 3f6caaf5ff33073ca1a3a0b82edacab3c57c38f9 (patch) | |
tree | b9276adacfc801ef66b4b524c4f1ef967ef9312a /security | |
parent | LSM: Provide init debugging infrastructure (diff) | |
download | linux-3f6caaf5ff33073ca1a3a0b82edacab3c57c38f9.tar.xz linux-3f6caaf5ff33073ca1a3a0b82edacab3c57c38f9.zip |
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: Kees Cook <keescook@chromium.org>
Reviewed-by: Casey Schaufler <casey@schaufler-ca.com>
Reviewed-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: James Morris <james.morris@microsoft.com>
Diffstat (limited to 'security')
-rw-r--r-- | security/security.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/security/security.c b/security/security.c index 395f804f6a91..2055af907eba 100644 --- a/security/security.c +++ b/security/security.c @@ -55,10 +55,12 @@ static __initdata bool debug; static void __init major_lsm_init(void) { struct lsm_info *lsm; + int ret; for (lsm = __start_lsm_info; lsm < __end_lsm_info; lsm++) { init_debug("initializing %s\n", lsm->name); - lsm->init(); + ret = lsm->init(); + WARN(ret, "%s failed to initialize: %d\n", lsm->name, ret); } } |