diff options
| author | Paul Moore <paul@paul-moore.com> | 2025-02-18 17:25:20 -0500 |
|---|---|---|
| committer | Paul Moore <paul@paul-moore.com> | 2025-10-22 19:24:28 -0400 |
| commit | 4ab5efcc2829a38a3adcfdd9cd0c0e0eb6fb6939 (patch) | |
| tree | 8486b521b41da8b609927db04e311ef6e6dec3c1 /security/lsm_init.c | |
| parent | 3156bc814f21a976b25c1b4981dcb0f558302b27 (diff) | |
lsm: consolidate all of the LSM framework initcalls
The LSM framework itself registers a small number of initcalls, this
patch converts these initcalls into the new initcall mechanism.
Reviewed-by: Casey Schaufler <casey@schaufler-ca.com>
Reviewed-by: John Johansen <john.johhansen@canonical.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/lsm_init.c')
| -rw-r--r-- | security/lsm_init.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/security/lsm_init.c b/security/lsm_init.c index aacdac406ba5..0f668bca98f9 100644 --- a/security/lsm_init.c +++ b/security/lsm_init.c @@ -488,7 +488,12 @@ int __init security_init(void) */ static int __init security_initcall_pure(void) { - return lsm_initcall(pure); + int rc_adr, rc_lsm; + + rc_adr = min_addr_init(); + rc_lsm = lsm_initcall(pure); + + return (rc_adr ? rc_adr : rc_lsm); } pure_initcall(security_initcall_pure); @@ -506,7 +511,12 @@ early_initcall(security_initcall_early); */ static int __init security_initcall_core(void) { - return lsm_initcall(core); + int rc_sfs, rc_lsm; + + rc_sfs = securityfs_init(); + rc_lsm = lsm_initcall(core); + + return (rc_sfs ? rc_sfs : rc_lsm); } core_initcall(security_initcall_core); |
