From: David Miller <davem@davemloft.net>
To: chuck.lever@oracle.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/5] NET: Make ts_recent_stamp unsigned
Date: Tue, 23 Oct 2007 21:00:06 -0700 (PDT) [thread overview]
Message-ID: <20071023.210006.28787642.davem@davemloft.net> (raw)
In-Reply-To: <20071023154428.28115.10406.stgit@ingres.1015granger.net>
From: Chuck Lever <chuck.lever@oracle.com>
Date: Tue, 23 Oct 2007 11:44:28 -0400
> The get_seconds() function returns an unsigned long. To prevent incorrect
> comparison results between values saved in ts_recent_stamp and later
> invocations of get_seconds(), change the type of ts_recent_stamp to match
> the return type of get_seconds().
>
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> Cc: <netdev@vger.kernel.org>
I see two potential problems with this patch:
1) If you update struct tcp_options_received you should also
update struct tcp_timewait_sock similarly.
The fact that you missed this suggests that you didn't
grep the tree to see how else this variable is used and
this makes me extra concerned about this patch's correctness.
2) There are computations in the TCP stack using this member that
probably care about the signedness, such as:
net/ipv4/tcp_ipv4.c: get_seconds() - tcptw->tw_ts_recent_stamp > 1))) {
include/net/tcp.h: if (get_seconds() >= rx_opt->ts_recent_stamp + TCP_PAWS_24DAYS)
include/net/tcp.h: if (get_seconds() >= rx_opt->ts_recent_stamp + TCP_PAWS_24DAYS)
We should make sure we understand what is expected here, and
why it would still be correct after making both ts_recent_stamp
members unsigned.
Thanks.
next prev parent reply other threads:[~2007-10-24 4:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-23 15:44 Chuck Lever
2007-10-24 4:00 ` David Miller [this message]
2007-10-24 18:08 ` Chuck Lever
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=20071023.210006.28787642.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=chuck.lever@oracle.com \
--cc=linux-kernel@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
Powered by JetHome