From: Rafael J. Wysocki Date: Thu, 18 Oct 2007 10:04:45 +0000 (-0700) Subject: freezer: prevent new tasks from inheriting TIF_FREEZE set X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2e1318956ce6bf149af5c5e98499b5cd99f99c89;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git freezer: prevent new tasks from inheriting TIF_FREEZE set Tasks should go to the refrigerator only if explicitly requested to do that by the freezer and not as a result of inheriting the TIF_FREEZE flag set from the parent. Make it happen. Signed-off-by: Rafael J. Wysocki Acked-by: Pavel Machek Acked-by: Nigel Cunningham Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/fork.c b/kernel/fork.c index 490495a39c7e..7e455a93a75a 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -942,6 +942,7 @@ static inline void copy_flags(unsigned long clone_flags, struct task_struct *p) if (!(clone_flags & CLONE_PTRACE)) p->ptrace = 0; p->flags = new_flags; + clear_freeze_flag(p); } asmlinkage long sys_set_tid_address(int __user *tidptr)