diff options
author | Eric Dumazet <edumazet@google.com> | 2018-08-15 18:00:33 -0700 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2018-08-15 18:00:33 -0700 |
commit | 9a3d8b6046c5361e726e64148986fbb84ebc7540 (patch) | |
tree | 48769f8c41b7df6839656fc5a99671d34eec4918 | |
parent | 5e7ef055bf957d20d218a610602a3dffdeef2861 (diff) | |
parent | d18ec55af9d18203b3648b51a244293f3843117c (diff) | |
download | pi-v4.4-oreo-mr1-1.2-iot-release.tar.gz |
tcp: avoid collapses in tcp_prune_queue() if possibleandroid-o-mr1-iot-release-smart-display-r9android-o-mr1-iot-release-smart-display-r8android-o-mr1-iot-release-smart-display-r5android-o-mr1-iot-release-smart-display-r40.1Jandroid-o-mr1-iot-release-smart-display-r4android-o-mr1-iot-release-smart-display-r39android-o-mr1-iot-release-smart-display-r30android-o-mr1-iot-release-smart-display-r3android-o-mr1-iot-release-smart-display-r22android-o-mr1-iot-release-smart-display-r14android-o-mr1-iot-release-smart-clock-r6android-o-mr1-iot-release-smart-clock-r2android-o-mr1-iot-release-smart-clock-fsiandroid-o-mr1-iot-release-smart-clock-fcsandroid-o-mr1-iot-release-cube_r2android-o-mr1-iot-release-cube-fsiandroid-o-mr1-iot-release-cube-fcsoreo-mr1-1.2-iot-release
am: d18ec55af9
Change-Id: I1f2f48c79d95567cd79ff6b79395beacf2466f87
-rw-r--r-- | net/ipv4/tcp_input.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index be22b7d548ba..62df63245ab4 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -4878,6 +4878,9 @@ static int tcp_prune_queue(struct sock *sk) else if (tcp_under_memory_pressure(sk)) tp->rcv_ssthresh = min(tp->rcv_ssthresh, 4U * tp->advmss); + if (atomic_read(&sk->sk_rmem_alloc) <= sk->sk_rcvbuf) + return 0; + tcp_collapse_ofo_queue(sk); if (!skb_queue_empty(&sk->sk_receive_queue)) tcp_collapse(sk, &sk->sk_receive_queue, |