]> git.karo-electronics.de Git - karo-tx-linux.git/commit
tcp: Add TCP_USER_TIMEOUT negative value check
authorHangbin Liu <liuhangbin@gmail.com>
Thu, 26 Jul 2012 22:52:21 +0000 (22:52 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Aug 2012 15:23:13 +0000 (08:23 -0700)
commitae8effff91107fec667a7240d25978fe994da30b
treeabdd471df2a3fc32d61861f0e04609b935bec21f
parenta4631a7743f79abd92433e8b3da0cfb77d8c3b15
tcp: Add TCP_USER_TIMEOUT negative value check

[ Upstream commit 42493570100b91ef663c4c6f0c0fdab238f9d3c2 ]

TCP_USER_TIMEOUT is a TCP level socket option that takes an unsigned int. But
patch "tcp: Add TCP_USER_TIMEOUT socket option"(dca43c75) didn't check the negative
values. If a user assign -1 to it, the socket will set successfully and wait
for 4294967295 miliseconds. This patch add a negative value check to avoid
this issue.

Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/tcp.c