From: Steve VanDeBogart Date: Tue, 26 Aug 2008 22:14:36 +0000 (-0700) Subject: exit signals: use of uninitialized field notify_count X-Git-Tag: v2.6.27-rc5~3^2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2633f0e57b1127f4060d70bf460140dc9bb19386;p=linux-2.6 exit signals: use of uninitialized field notify_count task->signal->notify_count is only initialized if task->signal->group_exit_task is not NULL. Reorder a conditional so that uninitialised memory is not used. Found by Valgrind. Signed-off-by: Steve VanDeBogart Signed-off-by: Ingo Molnar --- diff --git a/kernel/exit.c b/kernel/exit.c index 38ec406301..75c6473876 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -918,8 +918,8 @@ static void exit_notify(struct task_struct *tsk, int group_dead) /* mt-exec, de_thread() is waiting for us */ if (thread_group_leader(tsk) && - tsk->signal->notify_count < 0 && - tsk->signal->group_exit_task) + tsk->signal->group_exit_task && + tsk->signal->notify_count < 0) wake_up_process(tsk->signal->group_exit_task); write_unlock_irq(&tasklist_lock);