From: Dave Jones <davej@redhat.com>
To: netdev@vger.kernel.org
Cc: dborkman@redhat.com, linux-coverity@vger.kernel.org
Subject: Re: net: sctp: rework multihoming retransmission path selection to rfc4960
Date: Thu, 6 Mar 2014 01:02:32 -0500 [thread overview]
Message-ID: <20140306060232.GA26578@redhat.com> (raw)
In-Reply-To: <20140305192635.6D9F7660D13@gitolite.kernel.org>
On Wed, Mar 05, 2014 at 07:26:35PM +0000, Linux Kernel wrote:
> Gitweb: http://git.kernel.org/linus/;a=commit;h=4c47af4d5eb2c2f78f886079a3920a7078a6f0a0
> Commit: 4c47af4d5eb2c2f78f886079a3920a7078a6f0a0
> Parent: b194c1f1dbd5f2671e49e0ac801b1b78dc7de93b
> Author: Daniel Borkmann <dborkman@redhat.com>
> AuthorDate: Thu Feb 20 20:51:06 2014 +0100
> Committer: David S. Miller <davem@davemloft.net>
> CommitDate: Sat Feb 22 00:26:05 2014 -0500
>
> net: sctp: rework multihoming retransmission path selection to rfc4960
minor nit that coverity just picked up..
> + /* Iterate from retran_path's successor back to retran_path. */
> + for (trans = list_next_entry(trans, transports); 1;
> + trans = list_next_entry(trans, transports)) {
> + /* Manually skip the head element. */
> + if (&trans->transports == &asoc->peer.transport_addr_list)
> + continue;
> + if (trans->state == SCTP_UNCONFIRMED)
> + continue;
> + trans_next = sctp_trans_elect_best(trans, trans_next);
> + /* Active is good enough for immediate return. */
> + if (trans_next->state == SCTP_ACTIVE)
> break;
^ trans_next dereference ...
> + /* We've reached the end, time to update path. */
> + if (trans == asoc->peer.retran_path)
> break;
> }
>
> + if (trans_next != NULL)
> + asoc->peer.retran_path = trans_next;
Belated NULL check.
Either the check is redundant, or it needs to be moved up.
Dave
next parent reply other threads:[~2014-03-06 6:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20140305192635.6D9F7660D13@gitolite.kernel.org>
2014-03-06 6:02 ` Dave Jones [this message]
2014-03-06 9:42 ` net: sctp: rework multihoming retransmission path selection to rfc4960 Daniel Borkmann
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=20140306060232.GA26578@redhat.com \
--to=davej@redhat.com \
--cc=dborkman@redhat.com \
--cc=linux-coverity@vger.kernel.org \
--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).