From c252492a429b086112d3e2c98ae1ab338e246073 Mon Sep 17 00:00:00 2001 From: weishu Date: Thu, 19 Jan 2023 16:38:45 +0700 Subject: [PATCH] kernel: add __init for init funcs --- kernel/ksu.c | 2 +- kernel/lsm_hook.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/ksu.c b/kernel/ksu.c index 7bd15f82..723579c3 100644 --- a/kernel/ksu.c +++ b/kernel/ksu.c @@ -300,7 +300,7 @@ int ksu_handle_prctl(int option, unsigned long arg2, unsigned long arg3, return 0; } -int kernelsu_init(void) +int __init kernelsu_init(void) { #ifdef CONFIG_KSU_DEBUG pr_alert("You are running DEBUG version of KernelSU"); diff --git a/kernel/lsm_hook.c b/kernel/lsm_hook.c index 2872d894..d57c84ba 100644 --- a/kernel/lsm_hook.c +++ b/kernel/lsm_hook.c @@ -28,7 +28,7 @@ static struct security_hook_list ksu_hooks[] = { LSM_HOOK_INIT(inode_rename, ksu_inode_rename), }; -void ksu_lsm_hook_init(void) +void __init ksu_lsm_hook_init(void) { #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) security_add_hooks(ksu_hooks, ARRAY_SIZE(ksu_hooks), "ksu");