Commit 2633f0e5 authored by Steve VanDeBogart's avatar Steve VanDeBogart Committed by Ingo Molnar

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: default avatarSteve VanDeBogart <vandebo-lkml@nerdbox.net>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 74870172
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment