tracehook_notify_death: use task_detached() helper

Previous thread: forget_original_parent: do not abuse child->ptrace_entry by Linux Kernel Mailing List on Thursday, April 2, 2009 - 10:02 pm. (1 message)

Next thread: ptrace_detach: the wrong wakeup breaks the ERESTARTxxx logic by Linux Kernel Mailing List on Thursday, April 2, 2009 - 10:02 pm. (1 message)
From: Linux Kernel Mailing List
Date: Thursday, April 2, 2009 - 10:02 pm

Gitweb:     http://git.kernel.org/linus/bb24c679a51b1a9b726b901330649e3861814ac0
Commit:     bb24c679a51b1a9b726b901330649e3861814ac0
Parent:     5dfc80be73dd0c212d2e6dd8dbf5afa07e680bbe
Author:     Oleg Nesterov <oleg@redhat.com>
AuthorDate: Thu Apr 2 16:58:20 2009 -0700
Committer:  Linus Torvalds <torvalds@linux-foundation.org>
CommitDate: Thu Apr 2 19:05:00 2009 -0700

    tracehook_notify_death: use task_detached() helper
    
    Now that task_detached() is exported, change tracehook_notify_death() to
    use this helper, nobody else checks ->exit_signal == -1 by hand.
    
    Signed-off-by: Oleg Nesterov <oleg@redhat.com>
    Cc: "Eric W. Biederman" <ebiederm@xmission.com>
    Cc: "Metzger, Markus T" <markus.t.metzger@intel.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>
---
 include/linux/tracehook.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h
index eb4c654..c7aa154 100644
--- a/include/linux/tracehook.h
+++ b/include/linux/tracehook.h
@@ -502,7 +502,7 @@ static inline int tracehook_notify_jctl(int notify, int why)
 static inline int tracehook_notify_death(struct task_struct *task,
 					 void **death_cookie, int group_dead)
 {
-	if (task->exit_signal == -1)
+	if (task_detached(task))
 		return task->ptrace ? SIGCHLD : DEATH_REAP;
 
 	/*
--

Previous thread: forget_original_parent: do not abuse child->ptrace_entry by Linux Kernel Mailing List on Thursday, April 2, 2009 - 10:02 pm. (1 message)

Next thread: ptrace_detach: the wrong wakeup breaks the ERESTARTxxx logic by Linux Kernel Mailing List on Thursday, April 2, 2009 - 10:02 pm. (1 message)