The freezer framework now supports per-task freeze priorities. To
ensure consistent behavior, this patch assigns a default freeze
priority (FREEZE_PRIORITY_NORMAL) to all newly created userspace tasks.
This helps maintain deterministic freezing order and prepares the
ground for future enhancements based on priority-aware freezing logic.
Kernel threads are not affected by this change, since they are excluded.
Signed-off-by: Zihuan Zhang <zhangzihuan@kylinos.cn>
---
kernel/fork.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/fork.c b/kernel/fork.c
index 9ce93fd20f82..04af5390af25 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -2422,6 +2422,7 @@ __latent_entropy struct task_struct *copy_process(
copy_oom_score_adj(clone_flags, p);
+ freeze_set_default_priority(p, FREEZE_PRIORITY_NORMAL);
return p;
bad_fork_core_free:
--
2.25.1