diff options
Diffstat (limited to 'kernel/signal.c')
-rw-r--r-- | kernel/signal.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index ef8156a6aad5..ad63109e413c 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -378,7 +378,7 @@ int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info) | |||
378 | /* We only dequeue private signals from ourselves, we don't let | 378 | /* We only dequeue private signals from ourselves, we don't let |
379 | * signalfd steal them | 379 | * signalfd steal them |
380 | */ | 380 | */ |
381 | if (tsk == current) | 381 | if (likely(tsk == current)) |
382 | signr = __dequeue_signal(&tsk->pending, mask, info); | 382 | signr = __dequeue_signal(&tsk->pending, mask, info); |
383 | if (!signr) { | 383 | if (!signr) { |
384 | signr = __dequeue_signal(&tsk->signal->shared_pending, | 384 | signr = __dequeue_signal(&tsk->signal->shared_pending, |
@@ -425,7 +425,7 @@ int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info) | |||
425 | if (!(tsk->signal->flags & SIGNAL_GROUP_EXIT)) | 425 | if (!(tsk->signal->flags & SIGNAL_GROUP_EXIT)) |
426 | tsk->signal->flags |= SIGNAL_STOP_DEQUEUED; | 426 | tsk->signal->flags |= SIGNAL_STOP_DEQUEUED; |
427 | } | 427 | } |
428 | if ( signr && | 428 | if (signr && likely(tsk == current) && |
429 | ((info->si_code & __SI_MASK) == __SI_TIMER) && | 429 | ((info->si_code & __SI_MASK) == __SI_TIMER) && |
430 | info->si_sys_private){ | 430 | info->si_sys_private){ |
431 | /* | 431 | /* |
@@ -1561,10 +1561,6 @@ static inline int may_ptrace_stop(void) | |||
1561 | (current->ptrace & PT_ATTACHED))) | 1561 | (current->ptrace & PT_ATTACHED))) |
1562 | return 0; | 1562 | return 0; |
1563 | 1563 | ||
1564 | if (unlikely(current->signal == current->parent->signal) && | ||
1565 | unlikely(current->signal->flags & SIGNAL_GROUP_EXIT)) | ||
1566 | return 0; | ||
1567 | |||
1568 | /* | 1564 | /* |
1569 | * Are we in the middle of do_coredump? | 1565 | * Are we in the middle of do_coredump? |
1570 | * If so and our tracer is also part of the coredump stopping | 1566 | * If so and our tracer is also part of the coredump stopping |