From d17960d9eccdc8ddb553c3a1f7df9233199f1a9b Mon Sep 17 00:00:00 2001 From: Prslc Date: Thu, 28 Aug 2025 10:16:41 +0800 Subject: [PATCH] kernel: define ksu_core_exit() for <4.1 devices without LSM hooks (#360) * kernel: define ksu_core_exit() for <4.1 devices without LSM hooks Ensure ksu_core_exit() is defined even if CONFIG_KSU_LSM_SECURITY_HOOKS is disabled, which is mostly relevant for kernels 4.1 and older, preventing build failures due to missing exit function. Signed-off-by: Prslc * kernel: consolidate ksu_core_exit() definition Move ksu_core_exit() out of the CONFIG_KSU_LSM_SECURITY_HOOKS conditional branches to remove redundant empty definitions and ensure the exit function is always available. Signed-off-by: Prslc --------- Signed-off-by: Prslc --- kernel/core_hook.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/core_hook.c b/kernel/core_hook.c index 96aea27e..2a7a5a9a 100644 --- a/kernel/core_hook.c +++ b/kernel/core_hook.c @@ -1067,13 +1067,13 @@ void __init ksu_core_init(void) { ksu_lsm_hook_init(); } - -void ksu_core_exit(void) -{ -} #else void __init ksu_core_init(void) { pr_info("ksu_core_init: LSM hooks not in use.\n"); } #endif //CONFIG_KSU_LSM_SECURITY_HOOKS + +void ksu_core_exit(void) +{ +} \ No newline at end of file