kernel: Fix compilation for non-gki kernels (#593)

This commit is contained in:
TwinbornPlate75
2025-11-17 20:10:06 +08:00
committed by GitHub
parent 55ddeb63fb
commit 9d5c6ab3fd
10 changed files with 36 additions and 100 deletions

View File

@@ -19,6 +19,7 @@
#include "klog.h" // IWYU pragma: keep
#include "ksud.h"
#include "kernel_compat.h"
#include "selinux/selinux.h"
#include "allowlist.h"
#include "manager.h"
@@ -431,11 +432,7 @@ void persistent_allow_list()
goto put_task;
}
cb->func = do_persistent_allow_list;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 7, 0)
task_work_add(tsk, cb, TWA_RESUME);
#else
task_work_add(tsk, cb, true);
#endif
put_task:
put_task_struct(tsk);