tcp: avoid integer overflows in tcp_rcv_space_adjust()
authorEric Dumazet <edumazet@google.com>
Mon, 11 Dec 2017 01:55:03 +0000 (17:55 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 12 Dec 2017 15:53:04 +0000 (10:53 -0500)
commit607065bad9931e72207b0cac365d7d4abc06bd99
treed18808d1c3bf46dd8a899c3877257ea8c4961b61
parent02db55718d53f9d426cee504c27fb768e9ed4ffe
tcp: avoid integer overflows in tcp_rcv_space_adjust()

When using large tcp_rmem[2] values (I did tests with 500 MB),
I noticed overflows while computing rcvwin.

Lets fix this before the following patch.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Acked-by: Wei Wang <weiwan@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/tcp.h
net/ipv4/tcp_input.c