[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080118.203723.184002414.davem@davemloft.net>
Date: Fri, 18 Jan 2008 20:37:23 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: vladislav.yasevich@...com
Cc: akpm@...ux-foundation.org, netdev@...r.kernel.org
Subject: Re: sctp use-uninitialized warning in net-2.6.25
From: Vlad Yasevich <vladislav.yasevich@...com>
Date: Fri, 18 Jan 2008 21:17:56 -0500
> 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.
Here is the code block in question in net-2.6.25:
/* Verify the INIT chunk before processing it. */
err_chunk = NULL;
if (!sctp_verify_init(asoc, chunk->chunk_hdr->type,
(sctp_init_chunk_t *)chunk->chunk_hdr, chunk,
&err_chunk)) {
...
if (err_chunk) {
...
if (packet) {
sctp_add_cmd_sf(commands, SCTP_CMD_SEND_PKT,
SCTP_PACKET(packet));
SCTP_INC_STATS(SCTP_MIB_OUTCTRLCHUNKS);
error = SCTP_ERROR_INV_PARAM;
} else {
error = SCTP_ERROR_NO_RESOURCE;
}
}
...
return sctp_stop_t1_and_abort(commands, error, ECONNREFUSED,
asoc, chunk->transport);
If err_chunk == NULL at the "if (err_chunk)" test, error
will be left uninitialized, even after being moved as you
have suggested (right after the sctp_verify_init() call).
Thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists