[PATCH] ptrace: mm_need_new_owner: use ->real_parent to search inthe siblings

From: Oleg Nesterov
Date: Thu Apr 23 2009 - 17:23:56 EST


"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@xxxxxxxxxx>

--- 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;
}

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/