提交 dea33cfd 编写于 作者: O Oleg Nesterov 提交者: Linus Torvalds

ptrace: mm_need_new_owner: use ->real_parent to search in the siblings

"Search in the siblings" should use ->real_parent, not ->parent.  If the
task is traced then ->parent == tracer, while the task's parent is always
->real_parent.
Signed-off-by: NOleg Nesterov <oleg@redhat.com>
Acked-by: NRoland McGrath <roland@redhat.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 48597760
......@@ -590,7 +590,7 @@ void mm_update_next_owner(struct mm_struct *mm)
/*
* Search in the siblings
*/
list_for_each_entry(c, &p->parent->children, sibling) {
list_for_each_entry(c, &p->real_parent->children, sibling) {
if (c->mm == mm)
goto assign_new_owner;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册