Commit 18b1e819 authored by Roland McGrath's avatar Roland McGrath Committed by Greg Kroah-Hartman

[PATCH] fix non-leader exec under ptrace

This reverts most of commit 30e0fca6.
It broke the case of non-leader MT exec when ptraced.
I think the bug it was intended to fix was already addressed by commit
788e05a6.
Signed-off-by: default avatarRoland McGrath <roland@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 49fa79e5
...@@ -57,10 +57,6 @@ void ptrace_untrace(task_t *child) ...@@ -57,10 +57,6 @@ void ptrace_untrace(task_t *child)
signal_wake_up(child, 1); signal_wake_up(child, 1);
} }
} }
if (child->signal->flags & SIGNAL_GROUP_EXIT) {
sigaddset(&child->pending.signal, SIGKILL);
signal_wake_up(child, 1);
}
spin_unlock(&child->sighand->siglock); spin_unlock(&child->sighand->siglock);
} }
...@@ -82,6 +78,7 @@ void __ptrace_unlink(task_t *child) ...@@ -82,6 +78,7 @@ void __ptrace_unlink(task_t *child)
SET_LINKS(child); SET_LINKS(child);
} }
if (child->state == TASK_TRACED)
ptrace_untrace(child); ptrace_untrace(child);
} }
......
...@@ -1942,9 +1942,9 @@ int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka, ...@@ -1942,9 +1942,9 @@ int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka,
/* Let the debugger run. */ /* Let the debugger run. */
ptrace_stop(signr, signr, info); ptrace_stop(signr, signr, info);
/* We're back. Did the debugger cancel the sig or group_exit? */ /* We're back. Did the debugger cancel the sig? */
signr = current->exit_code; signr = current->exit_code;
if (signr == 0 || current->signal->flags & SIGNAL_GROUP_EXIT) if (signr == 0)
continue; continue;
current->exit_code = 0; current->exit_code = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment