diff options
author | Todd Kjos <tkjos@google.com> | 2017-03-02 13:53:48 -0800 |
---|---|---|
committer | Todd Kjos <tkjos@google.com> | 2017-03-02 13:53:48 -0800 |
commit | 837de638dc019843efb0f8744e299769af32e004 (patch) | |
tree | 3f693d421593332edcdf1d877433d31e9f1525de /net/ipv4/tcp_output.c | |
parent | f04805218728192d346291c1a0e78cb184142bad (diff) | |
parent | dd4534d88b93a911983503851ec9441787a4997d (diff) |
Merge branch 'upstream-linux-4.4.y' into android-4.4
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r-- | net/ipv4/tcp_output.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index ca3731721d81..8a62ad0c850b 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -2383,9 +2383,11 @@ u32 __tcp_select_window(struct sock *sk) int full_space = min_t(int, tp->window_clamp, allowed_space); int window; - if (mss > full_space) + if (unlikely(mss > full_space)) { mss = full_space; - + if (mss <= 0) + return 0; + } if (free_space < (full_space >> 1)) { icsk->icsk_ack.quick = 0; |