From edeff936ce7ba696dbc0be5bc091ca6b28cffad2 Mon Sep 17 00:00:00 2001 From: ShirkNeko <109797057+ShirkNeko@users.noreply.github.com> Date: Tue, 11 Nov 2025 18:25:21 +0800 Subject: [PATCH] kernel: fix build --- kernel/ksu.c | 10 ++++++++++ kernel/ksu.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/kernel/ksu.c b/kernel/ksu.c index d48594f8..72bf586c 100644 --- a/kernel/ksu.c +++ b/kernel/ksu.c @@ -2,6 +2,7 @@ #include #include #include +#include #include #include #include /* LINUX_VERSION_CODE, KERNEL_VERSION macros */ @@ -17,6 +18,13 @@ #include "ksud.h" #include "supercalls.h" +static struct workqueue_struct *ksu_workqueue; + +bool ksu_queue_work(struct work_struct *work) +{ + return queue_work(ksu_workqueue, work); +} + extern int ksu_handle_execveat_sucompat(int *fd, struct filename **filename_ptr, void *argv, void *envp, int *flags); extern int ksu_handle_execveat_ksud(int *fd, struct filename **filename_ptr, @@ -50,6 +58,8 @@ int __init kernelsu_init(void) ksu_core_init(); + ksu_workqueue = alloc_ordered_workqueue("kernelsu_work_queue", 0); + ksu_allowlist_init(); ksu_throne_tracker_init(); diff --git a/kernel/ksu.h b/kernel/ksu.h index 1e3fc4e8..db14bf92 100644 --- a/kernel/ksu.h +++ b/kernel/ksu.h @@ -111,4 +111,6 @@ static inline int endswith(const char *s, const char *t) } #endif +bool ksu_queue_work(struct work_struct *work); + #endif \ No newline at end of file