From: Dave Jones <davej@redhat•com>
To: netdev@vger•kernel.org
Cc: dhowells@redhat•com
Subject: suspicious code in net/rxrpc/ar-error.c
Date: Thu, 13 Feb 2014 21:28:15 -0500 [thread overview]
Message-ID: <20140214022815.GA19030@redhat.com> (raw)
While looking through old coverity reports, I came across this..
84 if (mtu == 0) {
85 /* they didn't give us a size, estimate one */
86 if (mtu > 1500) {
87 mtu >>= 1;
88 if (mtu < 1500)
89 mtu = 1500;
90 } else {
91 mtu -= 100;
92 if (mtu < peer->hdrsize)
93 mtu = peer->hdrsize + 4;
94 }
95 }
What was intended here ? Perhaps one of those mtu comparisons should be
comparing peer->mtu ?
Dave
next reply other threads:[~2014-02-14 2:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-14 2:28 Dave Jones [this message]
2014-02-14 11:21 ` suspicious code in net/rxrpc/ar-error.c David Howells
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=20140214022815.GA19030@redhat.com \
--to=davej@redhat$(echo .)com \
--cc=dhowells@redhat$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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