aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@tv-sign.ru>2008-04-30 03:52:58 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-30 11:29:36 -0400
commit34c8f07b9ac499a807918eda377193a55f64f8df (patch)
tree042cf061406273dcfdb3fabe4b07425e4cb8f0aa /kernel
parentac5c215383f43a106ba4ef298126bf78c126f5e9 (diff)
signals: handle_stop_signal: don't worry about SIGKILL
handle_stop_signal() clears SIGNAL_STOP_DEQUEUED when sig == SIGKILL. Remove this nasty special case. It was needed to prevent the race with group stop and exit caused by thread-specific SIGKILL. Now that we use complete_signal() for private signals too this is not needed, complete_signal() will notice SIGKILL and abort the soon-to-begin group stop. Except: the target thread is dead (has PF_EXITING). But in that case we should not just clear SIGNAL_STOP_DEQUEUED and nothing more. We should either kill the whole thread group, or silently ignore the signal. I suspect we are not right wrt zombie leaders, but this is another issue which and should be fixed separately. Note that this check can't abort the group stop if it was already started/finished, this check only adds a subtle side effect if we race with the thread which has already dequeued sig_kernel_stop() signal and temporary released ->siglock. Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Cc: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/signal.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/kernel/signal.c b/kernel/signal.c
index d52a1fe921fa..0a873279393c 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -643,12 +643,6 @@ static void handle_stop_signal(int sig, struct task_struct *p)
643 */ 643 */
644 signal->flags &= ~SIGNAL_STOP_DEQUEUED; 644 signal->flags &= ~SIGNAL_STOP_DEQUEUED;
645 } 645 }
646 } else if (sig == SIGKILL) {
647 /*
648 * Make sure that any pending stop signal already dequeued
649 * is undone by the wakeup for SIGKILL.
650 */
651 signal->flags &= ~SIGNAL_STOP_DEQUEUED;
652 } 646 }
653} 647}
654 648