* [PATCH] ptrace: mm_need_new_owner: use ->real_parent to search in the siblings
@ 2009-04-23 21:19 Oleg Nesterov
2009-04-23 23:25 ` Roland McGrath
0 siblings, 1 reply; 2+ messages in thread
From: Oleg Nesterov @ 2009-04-23 21:19 UTC (permalink / raw)
To: Andrew Morton; +Cc: Balbir Singh, Roland McGrath, linux-kernel
"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: Oleg Nesterov <oleg@redhat.com>
--- PTRACE/kernel/exit.c~ 2009-04-09 00:39:10.000000000 +0200
+++ PTRACE/kernel/exit.c 2009-04-23 23:08:37.000000000 +0200
@@ -590,7 +590,7 @@ retry:
/*
* 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;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ptrace: mm_need_new_owner: use ->real_parent to search in the siblings
2009-04-23 21:19 [PATCH] ptrace: mm_need_new_owner: use ->real_parent to search in the siblings Oleg Nesterov
@ 2009-04-23 23:25 ` Roland McGrath
0 siblings, 0 replies; 2+ messages in thread
From: Roland McGrath @ 2009-04-23 23:25 UTC (permalink / raw)
To: Oleg Nesterov; +Cc: Andrew Morton, Balbir Singh, linux-kernel
Acked-by: Roland McGrath <roland@redhat.com>
Note, I would also move "Search in the siblings" before "Search in the
children". It should be the most common case.
Thanks,
Roland
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-04-23 23:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-23 21:19 [PATCH] ptrace: mm_need_new_owner: use ->real_parent to search in the siblings Oleg Nesterov
2009-04-23 23:25 ` Roland McGrath
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.