提交 2e131895 编写于 作者: R Rafael J. Wysocki 提交者: Linus Torvalds

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: NRafael J. Wysocki <rjw@sisk.pl>
Acked-by: NPavel Machek <pavel@ucw.cz>
Acked-by: NNigel Cunningham <nigel@nigel.suspend2.net>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 232b1432
...@@ -942,6 +942,7 @@ static inline void copy_flags(unsigned long clone_flags, struct task_struct *p) ...@@ -942,6 +942,7 @@ static inline void copy_flags(unsigned long clone_flags, struct task_struct *p)
if (!(clone_flags & CLONE_PTRACE)) if (!(clone_flags & CLONE_PTRACE))
p->ptrace = 0; p->ptrace = 0;
p->flags = new_flags; p->flags = new_flags;
clear_freeze_flag(p);
} }
asmlinkage long sys_set_tid_address(int __user *tidptr) asmlinkage long sys_set_tid_address(int __user *tidptr)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册