diff options
Diffstat (limited to 'kernel/exit.c')
-rw-r--r-- | kernel/exit.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index 25f6805be5fe..4c108df88a37 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -92,10 +92,9 @@ static void __exit_signal(struct task_struct *tsk) | |||
92 | * If there is any task waiting for the group exit | 92 | * If there is any task waiting for the group exit |
93 | * then notify it: | 93 | * then notify it: |
94 | */ | 94 | */ |
95 | if (sig->group_exit_task && atomic_read(&sig->count) == sig->notify_count) { | 95 | if (sig->group_exit_task && atomic_read(&sig->count) == sig->notify_count) |
96 | wake_up_process(sig->group_exit_task); | 96 | wake_up_process(sig->group_exit_task); |
97 | sig->group_exit_task = NULL; | 97 | |
98 | } | ||
99 | if (tsk == sig->curr_target) | 98 | if (tsk == sig->curr_target) |
100 | sig->curr_target = next_thread(tsk); | 99 | sig->curr_target = next_thread(tsk); |
101 | /* | 100 | /* |
@@ -827,6 +826,11 @@ static void exit_notify(struct task_struct *tsk) | |||
827 | state = EXIT_DEAD; | 826 | state = EXIT_DEAD; |
828 | tsk->exit_state = state; | 827 | tsk->exit_state = state; |
829 | 828 | ||
829 | if (thread_group_leader(tsk) && | ||
830 | tsk->signal->notify_count < 0 && | ||
831 | tsk->signal->group_exit_task) | ||
832 | wake_up_process(tsk->signal->group_exit_task); | ||
833 | |||
830 | write_unlock_irq(&tasklist_lock); | 834 | write_unlock_irq(&tasklist_lock); |
831 | 835 | ||
832 | list_for_each_safe(_p, _n, &ptrace_dead) { | 836 | list_for_each_safe(_p, _n, &ptrace_dead) { |