From: Vlad Yasevich <vladislav.yasevich@hp.com>
To: David Miller <davem@davemloft.net>
Cc: akpm@linux-foundation.org, netdev@vger.kernel.org
Subject: Re: sctp use-uninitialized warning in net-2.6.25
Date: Fri, 18 Jan 2008 21:17:56 -0500 [thread overview]
Message-ID: <47915DD4.7090109@hp.com> (raw)
In-Reply-To: <20080118.153715.167557482.davem@davemloft.net>
David Miller wrote:
> From: Vlad Yasevich <vladislav.yasevich@hp.com>
> Date: Fri, 18 Jan 2008 11:03:20 -0500
>
>> We can do that, or move the declaration to the only block that uses it.
>> Like this:
> ...
>> @@ -466,6 +465,7 @@ sctp_disposition_t sctp_sf_do_5_1C_ack(const struct sctp_endpoint *ep,
>> if (!sctp_verify_init(asoc, chunk->chunk_hdr->type,
>> (sctp_init_chunk_t *)chunk->chunk_hdr, chunk,
>> &err_chunk)) {
>> + sctp_error_t error;
>>
>> SCTP_INC_STATS(SCTP_MIB_ABORTEDS);
>>
>
> It's still potentially used uninitialized.
>
> It will only get set if err_chunk is non-zero.
>
> But even if err_chunk is zero, we try to use this
> variable.
>
> That's the whole problem, simply moving the variable to
> a different scope is not going to fix anything.
>
Hmm... in the code I am looking at, it's set in both zero and
non-zero cases so it does solve the issue.
So does initializing it to NO_ERROR like you did.
-vlad
next prev parent reply other threads:[~2008-01-19 2:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-16 21:59 sctp use-uninitialized warning in net-2.6.25 Andrew Morton
2008-01-18 12:49 ` David Miller
2008-01-18 16:03 ` Vlad Yasevich
2008-01-18 23:37 ` David Miller
2008-01-19 2:17 ` Vlad Yasevich [this message]
2008-01-19 4:37 ` David Miller
2008-01-20 10:47 ` Vlad Yasevich
2008-01-20 14:11 ` David Miller
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=47915DD4.7090109@hp.com \
--to=vladislav.yasevich@hp.com \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).