Skip to content
Commit cdda8891 authored by bingtian.ly@taobao.com's avatar bingtian.ly@taobao.com Committed by David S. Miller
Browse files

net: avoid to hang up on sending due to sysctl configuration overflow.



    I found if we write a larger than 4GB value to some sysctl
variables, the sending syscall will hang up forever, because these
variables are 32 bits, such large values make them overflow to 0 or
negative.

    This patch try to fix overflow or prevent from zero value setup
of below sysctl variables:

net.core.wmem_default
net.core.rmem_default

net.core.rmem_max
net.core.wmem_max

net.ipv4.udp_rmem_min
net.ipv4.udp_wmem_min

net.ipv4.tcp_wmem
net.ipv4.tcp_rmem

Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: default avatarLi Yu <raise.sail@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f7b5d1b9
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment