[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.1.00.0808261505550.15543@abydos.NerdBox.Net>
Date: Tue, 26 Aug 2008 15:14:36 -0700 (PDT)
From: Steve VanDeBogart <vandebo-lkml@...dBox.Net>
To: linux-kernel@...r.kernel.org
cc: Ingo Molnar <mingo@...e.hu>
Subject: [PATCH] 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@...dbox.net>
---
Index: linux/kernel/exit.c
===================================================================
--- linux.orig/kernel/exit.c 2008-08-06 09:19:01.000000000 -0700
+++ linux/kernel/exit.c 2008-08-23 15:21:34.000000000 -0700
@@ -883,8 +883,8 @@
/* 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);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists