aboutsummaryrefslogtreecommitdiff
path: root/net/ipv4/tcp_output.c
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2017-02-24 12:03:18 +0800
committerAlex Shi <alex.shi@linaro.org>2017-02-24 12:03:18 +0800
commitaedb4a24b9ae4fbd6ced45ae64ae3d84b423f5c2 (patch)
tree222bb3ce7eb552c8f92bd836bb0b9dcad0020cb3 /net/ipv4/tcp_output.c
parent332efa4adbb90f2e335a405504fdfa6c1469701e (diff)
parentf1924ac09c968c94c922b723979d344b8ff106cd (diff)
Merge tag 'v4.4.51' into linux-linaro-lsk-v4.4
This is the 4.4.51 stable release
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r--net/ipv4/tcp_output.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 0795647e94c6..de95714d021c 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;