[PATCH] fix non-leader exec under ptrace
This reverts most of commit30e0fca6c1
. It broke the case of non-leader MT exec when ptraced. I think the bug it was intended to fix was already addressed by commit788e05a67c
. Signed-off-by: Roland McGrath <roland@redhat.com> Acked-by: Oleg Nesterov <oleg@tv-sign.ru> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
c06511d12d
commit
e57a505984
@@ -56,10 +56,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -81,6 +77,7 @@ void __ptrace_unlink(task_t *child)
|
|||||||
add_parent(child);
|
add_parent(child);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (child->state == TASK_TRACED)
|
||||||
ptrace_untrace(child);
|
ptrace_untrace(child);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1754,9 +1754,9 @@ relock:
|
|||||||
/* 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;
|
||||||
|
Reference in New Issue
Block a user