projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9b8c7c1
)
LSM: Don't ignore initialization failures
author
Kees Cook
<
[email protected]
>
Thu, 11 Oct 2018 00:18:26 +0000
(17:18 -0700)
committer
James Morris
<
[email protected]
>
Thu, 11 Oct 2018 03:40:22 +0000
(20:40 -0700)
LSM initialization failures have traditionally been ignored. We should
at least WARN when something goes wrong.
Signed-off-by: Kees Cook <
[email protected]
>
Reviewed-by: Casey Schaufler <
[email protected]
>
Reviewed-by: John Johansen <
[email protected]
>
Signed-off-by: James Morris <
[email protected]
>
security/security.c
patch
|
blob
|
history
diff --git
a/security/security.c
b/security/security.c
index 395f804f6a9171ad0e5f7ea95c38b5b9e95f1987..2055af907eba29469c602da8f6349ef9d1ae8ab5 100644
(file)
--- 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);
}
}