From: Steve VanDeBogart <vandebo-lkml@NerdBox.Net>
To: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Ingo Molnar <mingo@elte.hu>,
linux-kernel@vger.kernel.org, Roland McGrath <roland@redhat.com>
Subject: Re: [PATCH] exit signals: use of uninitialized field notify_count
Date: Wed, 27 Aug 2008 17:58:17 -0700 (PDT) [thread overview]
Message-ID: <alpine.DEB.1.00.0808271747160.15543@abydos.NerdBox.Net> (raw)
In-Reply-To: <20080827161141.GA97@tv-sign.ru>
On Wed, 27 Aug 2008, Oleg Nesterov wrote:
>> * Steve VanDeBogart <vandebo-lkml@NerdBox.Net> wrote:
>>
>>> 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.
>
> Minor comment. As Roland pointed out, it makes sense to initialize
> the whole signal_struct explicitely, perhaps copy_signal() should
> just use zalloc. In that case we don't need to check ->group_exit_task
> at all, the same for __exit_signal().
>
> Thanks Steve! and what do you think about the above?
It looks like that would work. Seems that
sig->count == 0 && sig->group_exit_task != NULL can never be true.
If it does work, a lot of initialization in copy_signal() can be
removed and it would reduce the chances that a similar problem would be
reintroduced. I would submit a patch, but I'm not sure how to trigger
those code paths in order to test it.
--
Steve
next prev parent reply other threads:[~2008-08-28 0:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-26 22:14 Steve VanDeBogart
2008-08-27 8:01 ` Ingo Molnar
2008-08-27 16:11 ` Oleg Nesterov
2008-08-28 0:58 ` Steve VanDeBogart [this message]
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.0808271747160.15543@abydos.NerdBox.Net \
--to=vandebo-lkml@nerdbox.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=oleg@tv-sign.ru \
--cc=roland@redhat.com \
/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®