diff options
author | Soheil Hassas Yeganeh <soheil@google.com> | 2018-06-09 04:47:10 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-06-10 23:12:50 +0200 |
commit | 867f816badc01e6da655028810d468c9f935b37c (patch) | |
tree | 8638841a4e39647569a24e5021bfa45586c90a3b /drivers/pinctrl/freescale/pinctrl-imx6ul.c | |
parent | net: phy: dp83822: use BMCR_ANENABLE instead of BMSR_ANEGCAPABLE for DP83620 (diff) | |
download | linux-867f816badc01e6da655028810d468c9f935b37c.tar.xz linux-867f816badc01e6da655028810d468c9f935b37c.zip |
tcp: limit sk_rcvlowat by the maximum receive buffer
The user-provided value to setsockopt(SO_RCVLOWAT) can be
larger than the maximum possible receive buffer. Such values
mute POLLIN signals on the socket which can stall progress
on the socket.
Limit the user-provided value to half of the maximum receive
buffer, i.e., half of sk_rcvbuf when the receive buffer size
is set by the user, or otherwise half of sysctl_tcp_rmem[2].
Fixes: d1361840f8c5 ("tcp: fix SO_RCVLOWAT and RCVBUF autotuning")
Signed-off-by: Soheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Neal Cardwell <ncardwell@google.com>
Acked-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/pinctrl/freescale/pinctrl-imx6ul.c')
0 files changed, 0 insertions, 0 deletions