From: bingtian.ly@taobao.com Date: Wed, 23 Jan 2013 20:35:28 +0000 (+0000) Subject: net: avoid to hang up on sending due to sysctl configuration overflow. X-Git-Tag: v3.2.69~21 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=98eee187cdee2807bd80e6c02180c5c2abae6453;p=pandora-kernel.git net: avoid to hang up on sending due to sysctl configuration overflow. commit cdda88912d62f9603d27433338a18be83ef23ac1 upstream. 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: Eric Dumazet Signed-off-by: Li Yu Signed-off-by: David S. Miller [bwh: Backported to 3.2: - Adjust context - Delete now-unused 'zero' variable] Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed