exit: avoid sig->count in de_thread/__exit_signal synchronization
[linux-2.6.git] / kernel / exit.c
index 59a104c..9220967 100644 (file)
@@ -97,7 +97,7 @@ static void __exit_signal(struct task_struct *tsk)
                 * If there is any task waiting for the group exit
                 * then notify it:
                 */
-               if (sig->group_exit_task && atomic_read(&sig->count) == sig->notify_count)
+               if (sig->notify_count > 0 && !--sig->notify_count)
                        wake_up_process(sig->group_exit_task);
 
                if (tsk == sig->curr_target)