From 4c28932c4c535d34764ec6f592d08aa040c22e42 Mon Sep 17 00:00:00 2001 From: Ylarod Date: Tue, 24 Jan 2023 08:42:25 +0800 Subject: [PATCH] kernel: run ksu_kprobe_init if build as module (#109) --- kernel/ksu.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/kernel/ksu.c b/kernel/ksu.c index 723579c3..f41b2c83 100644 --- a/kernel/ksu.c +++ b/kernel/ksu.c @@ -1,3 +1,4 @@ +#include "linux/export.h" #include #include #include @@ -306,7 +307,11 @@ int __init kernelsu_init(void) pr_alert("You are running DEBUG version of KernelSU"); #endif - ksu_lsm_hook_init(); // use ksu_kprobe_init if compiled as module +#ifndef MODULE + ksu_lsm_hook_init(); +#else + ksu_kprobe_init(); +#endif ksu_workqueue = alloc_workqueue("kernelsu_work_queue", 0, 0);