netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: gfree.wind@foxmail.com
Cc: netdev@vger.kernel.org, fgao@ikuai8.com
Subject: Re: [PATCH net-next 1/1] tcp: sysctl: Fix a race to avoid unexpected 0 window from space
Date: Fri, 24 Mar 2017 13:29:28 -0700 (PDT)	[thread overview]
Message-ID: <20170324.132928.1411503529271648421.davem@davemloft.net> (raw)
In-Reply-To: <1490310312-20661-1-git-send-email-gfree.wind@foxmail.com>

From: gfree.wind@foxmail.com
Date: Fri, 24 Mar 2017 07:05:12 +0800

> From: Gao Feng <fgao@ikuai8.com>
> 
> Because sysctl_tcp_adv_win_scale could be changed any time, so there
> is one race in tcp_win_from_space.
> For example,
> 1.sysctl_tcp_adv_win_scale<=0 (sysctl_tcp_adv_win_scale is negative now)
> 2.space>>(-sysctl_tcp_adv_win_scale) (sysctl_tcp_adv_win_scale is postive now)
> 
> As a result, tcp_win_from_space returns 0. It is unexpected.
> 
> Certainly if the compiler put the sysctl_tcp_adv_win_scale into one
> register firstly, then use the register directly, it would be ok.
> But we could not depend on the compiler behavior.
> 
> Signed-off-by: Gao Feng <fgao@ikuai8.com>

Applied.

  reply	other threads:[~2017-03-24 20:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-23 23:05 [PATCH net-next 1/1] tcp: sysctl: Fix a race to avoid unexpected 0 window from space gfree.wind
2017-03-24 20:29 ` David Miller [this message]
2017-03-24 20:31 ` Stephen Hemminger
2017-03-25  3:32   ` Gao Feng

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=20170324.132928.1411503529271648421.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=fgao@ikuai8.com \
    --cc=gfree.wind@foxmail.com \
    --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).