]> git.baikalelectronics.ru Git - kernel.git/commit
net/tcp: Fix tcp memory limits initialization when !CONFIG_SYSCTL
authorGlauber Costa <glommer@parallels.com>
Mon, 30 Jan 2012 01:20:17 +0000 (01:20 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 30 Jan 2012 17:41:06 +0000 (12:41 -0500)
commitd1dcc6f992a262efb11e10eb5246bd102338ee12
tree3a2dc1739d654effecd86749e49a40d41019e645
parent117e13137a920a1cdf126db92059f75c32456ee4
net/tcp: Fix tcp memory limits initialization when !CONFIG_SYSCTL

sysctl_tcp_mem() initialization was moved to sysctl_tcp_ipv4.c
in commit 9c96f2bc3e9ebe294baa116652c943638294cf3c, since it
became a per-ns value.

That code, however, will never run when CONFIG_SYSCTL is
disabled, leading to bogus values on those fields - causing hung
TCP sockets.

This patch fixes it by keeping an initialization code in
tcp_init(). It will be overwritten by the first net namespace
init if CONFIG_SYSCTL is compiled in, and do the right thing if
it is compiled out.

It is also named properly as tcp_init_mem(), to properly signal
its non-sysctl side effect on TCP limits.

Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Glauber Costa <glommer@parallels.com>
Cc: David S. Miller <davem@davemloft.net>
Link: http://lkml.kernel.org/r/4F22D05A.8030604@parallels.com
[ renamed the function, tidied up the changelog a bit ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/tcp.h
net/ipv4/sysctl_net_ipv4.c
net/ipv4/tcp.c