summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2017-12-11 04:55:03 +0300
committerDavid S. Miller <davem@davemloft.net>2017-12-12 18:53:04 +0300
commit607065bad9931e72207b0cac365d7d4abc06bd99 (patch)
treed18808d1c3bf46dd8a899c3877257ea8c4961b61 /include
parent02db55718d53f9d426cee504c27fb768e9ed4ffe (diff)
downloadlinux-607065bad9931e72207b0cac365d7d4abc06bd99.tar.xz
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>
Diffstat (limited to 'include')
-rw-r--r--include/linux/tcp.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index ca4a6361389b..4f93f0953c41 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -344,7 +344,7 @@ struct tcp_sock {
/* Receiver queue space */
struct {
- int space;
+ u32 space;
u32 seq;
u64 time;
} rcvq_space;