aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/exit.c
diff options
context:
space:
mode:
authorSteve VanDeBogart <vandebo-lkml@NerdBox.Net>2008-08-26 18:14:36 -0400
committerIngo Molnar <mingo@elte.hu>2008-08-27 03:10:09 -0400
commit2633f0e57b1127f4060d70bf460140dc9bb19386 (patch)
treedb67beb9715fee165f8c8baaee47fc023b26dceb /kernel/exit.c
parent74870172824a78640ec4f03058d9bd35dfa08618 (diff)
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 <vandebo-lkml@nerdbox.net> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/exit.c')
-rw-r--r--kernel/exit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index 38ec40630149..75c647387639 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -918,8 +918,8 @@ static void exit_notify(struct task_struct *tsk, int group_dead)
918 918
919 /* mt-exec, de_thread() is waiting for us */ 919 /* mt-exec, de_thread() is waiting for us */
920 if (thread_group_leader(tsk) && 920 if (thread_group_leader(tsk) &&
921 tsk->signal->notify_count < 0 && 921 tsk->signal->group_exit_task &&
922 tsk->signal->group_exit_task) 922 tsk->signal->notify_count < 0)
923 wake_up_process(tsk->signal->group_exit_task); 923 wake_up_process(tsk->signal->group_exit_task);
924 924
925 write_unlock_irq(&tasklist_lock); 925 write_unlock_irq(&tasklist_lock);