diff options
Diffstat (limited to 'kernel/signal.c')
-rw-r--r-- | kernel/signal.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index 359c4de7c772..8423867f7d8f 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -633,6 +633,11 @@ static int prepare_signal(int sig, struct task_struct *p) | |||
633 | why |= SIGNAL_CLD_STOPPED; | 633 | why |= SIGNAL_CLD_STOPPED; |
634 | 634 | ||
635 | if (why) { | 635 | if (why) { |
636 | /* | ||
637 | * The first thread which returns from finish_stop() | ||
638 | * will take ->siglock, notice SIGNAL_CLD_MASK, and | ||
639 | * notify its parent. See get_signal_to_deliver(). | ||
640 | */ | ||
636 | signal->flags = why | SIGNAL_STOP_CONTINUED; | 641 | signal->flags = why | SIGNAL_STOP_CONTINUED; |
637 | signal->group_stop_count = 0; | 642 | signal->group_stop_count = 0; |
638 | signal->group_exit_code = 0; | 643 | signal->group_exit_code = 0; |
@@ -1694,7 +1699,11 @@ relock: | |||
1694 | try_to_freeze(); | 1699 | try_to_freeze(); |
1695 | 1700 | ||
1696 | spin_lock_irq(&sighand->siglock); | 1701 | spin_lock_irq(&sighand->siglock); |
1697 | 1702 | /* | |
1703 | * Every stopped thread goes here after wakeup. Check to see if | ||
1704 | * we should notify the parent, prepare_signal(SIGCONT) encodes | ||
1705 | * the CLD_ si_code into SIGNAL_CLD_MASK bits. | ||
1706 | */ | ||
1698 | if (unlikely(signal->flags & SIGNAL_CLD_MASK)) { | 1707 | if (unlikely(signal->flags & SIGNAL_CLD_MASK)) { |
1699 | int why = (signal->flags & SIGNAL_STOP_CONTINUED) | 1708 | int why = (signal->flags & SIGNAL_STOP_CONTINUED) |
1700 | ? CLD_CONTINUED : CLD_STOPPED; | 1709 | ? CLD_CONTINUED : CLD_STOPPED; |