mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-03-27 17:35:35 +00:00
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>
This commit is contained in:
parent
9b8c7c1405
commit
3f6caaf5ff
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue