Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=247284481ca40288bd120cf0707681c3bdbee78f
Commit:     247284481ca40288bd120cf0707681c3bdbee78f
Parent:     b6b1d87785712474d0ed80689c17107d616a1171
Author:     Oleg Nesterov <[EMAIL PROTECTED]>
AuthorDate: Sat Aug 4 01:04:41 2007 +0400
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Aug 3 15:06:33 2007 -0700

    Kill some obsolete sub-thread-ptrace stuff
    
    There is a couple of subtle checks which were needed to handle ptracing from
    the same thread group. This was deprecated a long ago, imho this code just
    complicates the understanding.
    
    And, the "->parent->signal->flags & SIGNAL_GROUP_EXIT" check in 
exit_notify()
    is not right. SIGNAL_GROUP_EXIT can mean exec(), not exit_group(). This 
means
    ptracer can lose a ptraced zombie on exec(). Minor problem, but still the 
bug.
    
    Signed-off-by: Oleg Nesterov <[EMAIL PROTECTED]>
    Acked-by: Roland McGrath <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 kernel/exit.c   |    8 ++------
 kernel/signal.c |    4 ----
 2 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/kernel/exit.c b/kernel/exit.c
index 464c2b1..9578c1a 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -813,7 +813,7 @@ static void exit_notify(struct task_struct *tsk)
                __kill_pgrp_info(SIGCONT, SEND_SIG_PRIV, pgrp);
        }
 
-       /* Let father know we died 
+       /* Let father know we died
         *
         * Thread signals are configurable, but you aren't going to use
         * that to send signals to arbitary processes. 
@@ -826,9 +826,7 @@ static void exit_notify(struct task_struct *tsk)
         * If our self_exec id doesn't match our parent_exec_id then
         * we have changed execution domain as these two values started
         * the same after a fork.
-        *      
         */
-       
        if (tsk->exit_signal != SIGCHLD && tsk->exit_signal != -1 &&
            ( tsk->parent_exec_id != t->self_exec_id  ||
              tsk->self_exec_id != tsk->parent_exec_id)
@@ -848,9 +846,7 @@ static void exit_notify(struct task_struct *tsk)
        }
 
        state = EXIT_ZOMBIE;
-       if (tsk->exit_signal == -1 &&
-           (likely(tsk->ptrace == 0) ||
-            unlikely(tsk->parent->signal->flags & SIGNAL_GROUP_EXIT)))
+       if (tsk->exit_signal == -1 && likely(!tsk->ptrace))
                state = EXIT_DEAD;
        tsk->exit_state = state;
 
diff --git a/kernel/signal.c b/kernel/signal.c
index ef8156a..b27c01a 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -1561,10 +1561,6 @@ static inline int may_ptrace_stop(void)
                    (current->ptrace & PT_ATTACHED)))
                return 0;
 
-       if (unlikely(current->signal == current->parent->signal) &&
-           unlikely(current->signal->flags & SIGNAL_GROUP_EXIT))
-               return 0;
-
        /*
         * Are we in the middle of do_coredump?
         * If so and our tracer is also part of the coredump stopping
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to