summaryrefslogtreecommitdiff
path: root/drivers/staging/rdma/ipath/ipath_file_ops.c
diff options
context:
space:
mode:
authorSoheil Hassas Yeganeh <soheil@google.com>2016-07-29 09:34:02 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-08-16 09:30:48 +0200
commit9c946c931b63068c4197d9d0b4d24635418bc67d (patch)
tree3a8b1b3af1d7e613234678274e5797d6f1ca4a02 /drivers/staging/rdma/ipath/ipath_file_ops.c
parente23696bc441f5e4fefb18e81d51069632480f64a (diff)
tcp: consider recv buf for the initial window scale
[ Upstream commit f626300a3e776ccc9671b0dd94698fb3aa315966 ] tcp_select_initial_window() intends to advertise a window scaling for the maximum possible window size. To do so, it considers the maximum of net.ipv4.tcp_rmem[2] and net.core.rmem_max as the only possible upper-bounds. However, users with CAP_NET_ADMIN can use SO_RCVBUFFORCE to set the socket's receive buffer size to values larger than net.ipv4.tcp_rmem[2] and net.core.rmem_max. Thus, SO_RCVBUFFORCE is effectively ignored by tcp_select_initial_window(). To fix this, consider the maximum of net.ipv4.tcp_rmem[2], net.core.rmem_max and socket's initial buffer space. Fixes: b0573dea1fb3 ("[NET]: Introduce SO_{SND,RCV}BUFFORCE socket options") Signed-off-by: Soheil Hassas Yeganeh <soheil@google.com> Suggested-by: Neal Cardwell <ncardwell@google.com> Acked-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rdma/ipath/ipath_file_ops.c')
0 files changed, 0 insertions, 0 deletions