From: Steve VanDeBogart <vandebo-lkml@NerdBox.Net>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>
Subject: [PATCH] exit signals: use of uninitialized field notify_count
Date: Tue, 26 Aug 2008 15:14:36 -0700 (PDT) [thread overview]
Message-ID: <alpine.DEB.1.00.0808261505550.15543@abydos.NerdBox.Net> (raw)
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>
---
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);
next reply other threads:[~2008-08-26 22:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-26 22:14 Steve VanDeBogart [this message]
2008-08-27 8:01 ` Ingo Molnar
2008-08-27 16:11 ` Oleg Nesterov
2008-08-28 0:58 ` Steve VanDeBogart
2008-08-28 12:58 ` Oleg Nesterov
2008-08-28 0:27 ` Steve VanDeBogart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.1.00.0808261505550.15543@abydos.NerdBox.Net \
--to=vandebo-lkml@nerdbox.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®