Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 256860
b: refs/heads/master
c: bb3696d
h: refs/heads/master
v: v3
  • Loading branch information
Oleg Nesterov committed Jun 27, 2011
1 parent 6dd0513 commit 87104d8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0347e17739095c58c0194fed6a61aced3536d258
refs/heads/master: bb3696da89743d580f869142d0a6e6ba9b7fe89a
20 changes: 4 additions & 16 deletions trunk/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -1759,15 +1759,6 @@ static int sigkill_pending(struct task_struct *tsk)
sigismember(&tsk->signal->shared_pending.signal, SIGKILL);
}

/*
* Test whether the target task of the usual cldstop notification - the
* real_parent of @child - is in the same group as the ptracer.
*/
static bool real_parent_is_ptracer(struct task_struct *child)
{
return same_thread_group(child->parent, child->real_parent);
}

/*
* This must be called with current->sighand->siglock held.
*
Expand Down Expand Up @@ -1848,7 +1839,7 @@ static void ptrace_stop(int exit_code, int why, int clear_code, siginfo_t *info)
* separately unless they're gonna be duplicates.
*/
do_notify_parent_cldstop(current, true, why);
if (gstop_done && !real_parent_is_ptracer(current))
if (gstop_done && ptrace_reparented(current))
do_notify_parent_cldstop(current, false, why);

/*
Expand Down Expand Up @@ -2154,7 +2145,6 @@ int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka,
* the CLD_ si_code into SIGNAL_CLD_MASK bits.
*/
if (unlikely(signal->flags & SIGNAL_CLD_MASK)) {
struct task_struct *leader;
int why;

if (signal->flags & SIGNAL_CLD_CONTINUED)
Expand All @@ -2175,13 +2165,11 @@ int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka,
* a duplicate.
*/
read_lock(&tasklist_lock);

do_notify_parent_cldstop(current, false, why);

leader = current->group_leader;
if (leader->ptrace && !real_parent_is_ptracer(leader))
do_notify_parent_cldstop(leader, true, why);

if (ptrace_reparented(current->group_leader))
do_notify_parent_cldstop(current->group_leader,
true, why);
read_unlock(&tasklist_lock);

goto relock;
Expand Down

0 comments on commit 87104d8

Please sign in to comment.