|
@@ -1496,9 +1496,8 @@ static inline int may_ptrace_stop(void)
|
|
*/
|
|
*/
|
|
static int sigkill_pending(struct task_struct *tsk)
|
|
static int sigkill_pending(struct task_struct *tsk)
|
|
{
|
|
{
|
|
- return ((sigismember(&tsk->pending.signal, SIGKILL) ||
|
|
|
|
- sigismember(&tsk->signal->shared_pending.signal, SIGKILL)) &&
|
|
|
|
- !unlikely(sigismember(&tsk->blocked, SIGKILL)));
|
|
|
|
|
|
+ return sigismember(&tsk->pending.signal, SIGKILL) ||
|
|
|
|
+ sigismember(&tsk->signal->shared_pending.signal, SIGKILL);
|
|
}
|
|
}
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -1514,8 +1513,6 @@ static int sigkill_pending(struct task_struct *tsk)
|
|
*/
|
|
*/
|
|
static void ptrace_stop(int exit_code, int clear_code, siginfo_t *info)
|
|
static void ptrace_stop(int exit_code, int clear_code, siginfo_t *info)
|
|
{
|
|
{
|
|
- int killed = 0;
|
|
|
|
-
|
|
|
|
if (arch_ptrace_stop_needed(exit_code, info)) {
|
|
if (arch_ptrace_stop_needed(exit_code, info)) {
|
|
/*
|
|
/*
|
|
* The arch code has something special to do before a
|
|
* The arch code has something special to do before a
|
|
@@ -1531,7 +1528,8 @@ static void ptrace_stop(int exit_code, int clear_code, siginfo_t *info)
|
|
spin_unlock_irq(¤t->sighand->siglock);
|
|
spin_unlock_irq(¤t->sighand->siglock);
|
|
arch_ptrace_stop(exit_code, info);
|
|
arch_ptrace_stop(exit_code, info);
|
|
spin_lock_irq(¤t->sighand->siglock);
|
|
spin_lock_irq(¤t->sighand->siglock);
|
|
- killed = sigkill_pending(current);
|
|
|
|
|
|
+ if (sigkill_pending(current))
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -1548,7 +1546,7 @@ static void ptrace_stop(int exit_code, int clear_code, siginfo_t *info)
|
|
__set_current_state(TASK_TRACED);
|
|
__set_current_state(TASK_TRACED);
|
|
spin_unlock_irq(¤t->sighand->siglock);
|
|
spin_unlock_irq(¤t->sighand->siglock);
|
|
read_lock(&tasklist_lock);
|
|
read_lock(&tasklist_lock);
|
|
- if (!unlikely(killed) && may_ptrace_stop()) {
|
|
|
|
|
|
+ if (may_ptrace_stop()) {
|
|
do_notify_parent_cldstop(current, CLD_TRAPPED);
|
|
do_notify_parent_cldstop(current, CLD_TRAPPED);
|
|
read_unlock(&tasklist_lock);
|
|
read_unlock(&tasklist_lock);
|
|
schedule();
|
|
schedule();
|