Skip to contentSkip to conversation

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

PATCH In review Oleg Nesterov 2 participants 2 messages Apr 23, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

kernel/exit.c renamed from kernel/exit.c~ +1 -1
@@ -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;
 	}