From: Pavel Emelyanov <xemul@parallels.com>
To: Andrey Vagin <avagin@openvz.org>
Cc: netdev@vger.kernel.org, criu@openvz.org,
linux-kernel@vger.kernel.org,
"David S. Miller" <davem@davemloft.net>,
Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
James Morris <jmorris@namei.org>,
Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
Patrick McHardy <kaber@trash.net>,
Eric Dumazet <edumazet@google.com>,
Yuchung Cheng <ycheng@google.com>,
Neal Cardwell <ncardwell@google.com>,
Dave Jones <davej@redhat.com>,
Michael Kerrisk <mtk.manpages@gmail.com>
Subject: Re: [PATCH 2/2] tcp: add ability to set a timestamp offset (v2)
Date: Wed, 23 Jan 2013 19:26:41 +0400 [thread overview]
Message-ID: <51000131.3070300@parallels.com> (raw)
In-Reply-To: <1358953314-12979-3-git-send-email-avagin@openvz.org>
> diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
> index 086ceda..23f93d4 100644
> --- a/net/ipv4/tcp.c
> +++ b/net/ipv4/tcp.c
> @@ -2704,6 +2704,10 @@ static int do_tcp_setsockopt(struct sock *sk, int level,
> else
> err = -EINVAL;
> break;
> + case TCP_TIMESTAMP:
> + tp->tsoffset = 0;
> + tp->tsoffset = val - tcp_time_stamp(tp);
I believe we should check that the socket state is TCP_CLOSE.
Otherwise tcp_time_stamp() readers might be surprised while
reading the value.
> + break;
> default:
> err = -ENOPROTOOPT;
> break;
next prev parent reply other threads:[~2013-01-23 15:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-23 15:01 [PATCH] [RFC] tcp: add ability to set a timestamp offset (v2) Andrey Vagin
2013-01-23 15:01 ` [PATCH 1/2] tcp: make tcp_timestamp dependent on tcp_sock Andrey Vagin
2013-01-23 16:25 ` Eric Dumazet
2013-01-24 7:46 ` Andrew Vagin
2013-01-23 16:27 ` Christoph Paasch
2013-01-23 15:01 ` [PATCH 2/2] tcp: add ability to set a timestamp offset (v2) Andrey Vagin
2013-01-23 15:26 ` Pavel Emelyanov [this message]
2013-01-23 16:20 ` [PATCH] [RFC] " Alexey Kuznetsov
2013-01-23 18:27 ` 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=51000131.3070300@parallels.com \
--to=xemul@parallels.com \
--cc=avagin@openvz.org \
--cc=criu@openvz.org \
--cc=davej@redhat.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jmorris@namei.org \
--cc=kaber@trash.net \
--cc=kuznet@ms2.inr.ac.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=mtk.manpages@gmail.com \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=ycheng@google.com \
--cc=yoshfuji@linux-ipv6.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