diff options
| author | Greg Kroah-Hartman <gregkh@google.com> | 2018-08-22 08:10:06 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@google.com> | 2018-08-22 08:10:06 +0200 |
| commit | 56f7e481fb16d30c1b1ff9a9cd4ebbf95db51ab1 (patch) | |
| tree | 6c7ef79c0f40992f6846966c6f8cf1a309289d6f /net/dccp/ccids/ccid2.c | |
| parent | fbd313da16de5cf863fe77e98414a4a9c9b7635e (diff) | |
| parent | 78f654f6cce3442937b8c7eb4b640357871363c1 (diff) | |
Merge 4.4.151 into android-4.4-p
Changes in 4.4.151
dccp: fix undefined behavior with 'cwnd' shift in ccid2_cwnd_restart()
l2tp: use sk_dst_check() to avoid race on sk->sk_dst_cache
llc: use refcount_inc_not_zero() for llc_sap_find()
net_sched: Fix missing res info when create new tc_index filter
vsock: split dwork to avoid reinitializations
net_sched: fix NULL pointer dereference when delete tcindex filter
ALSA: hda - Sleep for 10ms after entering D3 on Conexant codecs
ALSA: hda - Turn CX8200 into D3 as well upon reboot
ALSA: vx222: Fix invalid endian conversions
ALSA: virmidi: Fix too long output trigger loop
ALSA: cs5535audio: Fix invalid endian conversion
ALSA: hda: Correct Asrock B85M-ITX power_save blacklist entry
ALSA: memalloc: Don't exceed over the requested size
ALSA: vxpocket: Fix invalid endian conversions
USB: serial: sierra: fix potential deadlock at close
USB: option: add support for DW5821e
ACPI: save NVS memory for Lenovo G50-45
ACPI / PM: save NVS memory for ASUS 1025C laptop
serial: 8250_dw: always set baud rate in dw8250_set_termios
x86/mm: Simplify p[g4um]d_page() macros
Bluetooth: avoid killing an already killed socket
isdn: Disable IIOCDBGVAR
Linux 4.4.151
Change-Id: I6a0ff37985aa6e27dd05fccbde3caf04317ec5f9
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'net/dccp/ccids/ccid2.c')
| -rw-r--r-- | net/dccp/ccids/ccid2.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/dccp/ccids/ccid2.c b/net/dccp/ccids/ccid2.c index 86a2ed0fb219..161dfcf86126 100644 --- a/net/dccp/ccids/ccid2.c +++ b/net/dccp/ccids/ccid2.c @@ -228,14 +228,16 @@ static void ccid2_cwnd_restart(struct sock *sk, const u32 now) struct ccid2_hc_tx_sock *hc = ccid2_hc_tx_sk(sk); u32 cwnd = hc->tx_cwnd, restart_cwnd, iwnd = rfc3390_bytes_to_packets(dccp_sk(sk)->dccps_mss_cache); + s32 delta = now - hc->tx_lsndtime; hc->tx_ssthresh = max(hc->tx_ssthresh, (cwnd >> 1) + (cwnd >> 2)); /* don't reduce cwnd below the initial window (IW) */ restart_cwnd = min(cwnd, iwnd); - cwnd >>= (now - hc->tx_lsndtime) / hc->tx_rto; - hc->tx_cwnd = max(cwnd, restart_cwnd); + while ((delta -= hc->tx_rto) >= 0 && cwnd > restart_cwnd) + cwnd >>= 1; + hc->tx_cwnd = max(cwnd, restart_cwnd); hc->tx_cwnd_stamp = now; hc->tx_cwnd_used = 0; |
