diff options
Diffstat (limited to 'kernel/signal.c')
-rw-r--r-- | kernel/signal.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index fdab7b363fa7..39c1706edf03 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -1496,9 +1496,8 @@ static inline int may_ptrace_stop(void) | |||
1496 | */ | 1496 | */ |
1497 | static int sigkill_pending(struct task_struct *tsk) | 1497 | static int sigkill_pending(struct task_struct *tsk) |
1498 | { | 1498 | { |
1499 | return ((sigismember(&tsk->pending.signal, SIGKILL) || | 1499 | return sigismember(&tsk->pending.signal, SIGKILL) || |
1500 | sigismember(&tsk->signal->shared_pending.signal, SIGKILL)) && | 1500 | sigismember(&tsk->signal->shared_pending.signal, SIGKILL); |
1501 | !unlikely(sigismember(&tsk->blocked, SIGKILL))); | ||
1502 | } | 1501 | } |
1503 | 1502 | ||
1504 | /* | 1503 | /* |
@@ -1514,8 +1513,6 @@ static int sigkill_pending(struct task_struct *tsk) | |||
1514 | */ | 1513 | */ |
1515 | static void ptrace_stop(int exit_code, int clear_code, siginfo_t *info) | 1514 | static void ptrace_stop(int exit_code, int clear_code, siginfo_t *info) |
1516 | { | 1515 | { |
1517 | int killed = 0; | ||
1518 | |||
1519 | if (arch_ptrace_stop_needed(exit_code, info)) { | 1516 | if (arch_ptrace_stop_needed(exit_code, info)) { |
1520 | /* | 1517 | /* |
1521 | * The arch code has something special to do before a | 1518 | * 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) | |||
1531 | spin_unlock_irq(¤t->sighand->siglock); | 1528 | spin_unlock_irq(¤t->sighand->siglock); |
1532 | arch_ptrace_stop(exit_code, info); | 1529 | arch_ptrace_stop(exit_code, info); |
1533 | spin_lock_irq(¤t->sighand->siglock); | 1530 | spin_lock_irq(¤t->sighand->siglock); |
1534 | killed = sigkill_pending(current); | 1531 | if (sigkill_pending(current)) |
1532 | return; | ||
1535 | } | 1533 | } |
1536 | 1534 | ||
1537 | /* | 1535 | /* |
@@ -1548,7 +1546,7 @@ static void ptrace_stop(int exit_code, int clear_code, siginfo_t *info) | |||
1548 | __set_current_state(TASK_TRACED); | 1546 | __set_current_state(TASK_TRACED); |
1549 | spin_unlock_irq(¤t->sighand->siglock); | 1547 | spin_unlock_irq(¤t->sighand->siglock); |
1550 | read_lock(&tasklist_lock); | 1548 | read_lock(&tasklist_lock); |
1551 | if (!unlikely(killed) && may_ptrace_stop()) { | 1549 | if (may_ptrace_stop()) { |
1552 | do_notify_parent_cldstop(current, CLD_TRAPPED); | 1550 | do_notify_parent_cldstop(current, CLD_TRAPPED); |
1553 | read_unlock(&tasklist_lock); | 1551 | read_unlock(&tasklist_lock); |
1554 | schedule(); | 1552 | schedule(); |