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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Thursday, June 18, 2009 - 2:59 pm

Gitweb:     http://git.kernel.org/linus/dea33cfd99022d82d923a0c6a3bd895fb6683fb2
Commit:     dea33cfd99022d82d923a0c6a3bd895fb6683fb2
Parent:     48597760fad3d6a3e30a14241a3ce5ccb1a0e9bc
Author:     Oleg Nesterov <oleg@redhat.com>
AuthorDate: Wed Jun 17 16:27:29 2009 -0700
Committer:  Linus Torvalds <torvalds@linux-foundation.org>
CommitDate: Thu Jun 18 13:03:49 2009 -0700

    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: Oleg Nesterov <oleg@redhat.com>
    Acked-by: Roland McGrath <roland@redhat.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---
 kernel/exit.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/exit.c b/kernel/exit.c
index 533e5f8..213f906 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -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 git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
ptrace: mm_need_new_owner: use ->real_parent to search in ..., Linux Kernel Mailing ..., (Thu Jun 18, 2:59 pm)