From fefb02e578aad9ce8a748a001f3f21d550f97da5 Mon Sep 17 00:00:00 2001 From: weishu Date: Mon, 18 Mar 2024 18:50:42 +0800 Subject: [PATCH] kernel: remove it from sysfs --- kernel/ksu.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kernel/ksu.c b/kernel/ksu.c index 28b8c0078b1e..2bd42ebdf91d 100644 --- a/kernel/ksu.c +++ b/kernel/ksu.c @@ -1,4 +1,6 @@ +#include "linux/export.h" #include "linux/fs.h" +#include "linux/kobject.h" #include "linux/module.h" #include "linux/workqueue.h" @@ -60,6 +62,9 @@ int __init kernelsu_init(void) pr_alert("KPROBES is disabled, KernelSU may not work, please check https://kernelsu.org/guide/how-to-integrate-for-non-gki.html"); #endif +#ifdef MODULE + kobject_del(&THIS_MODULE->mkobj.kobj); +#endif return 0; }