aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp.c
diff options
context:
space:
mode:
authorKalimochoAz <calimochoazucarado@gmail.com>2012-08-30 21:49:20 +0200
committerKalimochoAz <calimochoazucarado@gmail.com>2012-08-30 21:49:20 +0200
commit2a4a7840c4bf66614b49c2828947f2cccb6ab36f (patch)
treea2b98163d6f4ae05a9f0557e484cc120603a42c6 /net/ipv4/tcp.c
parentde60756ed5f5a5c82d5c799850148f68346e5918 (diff)
parent5aa287dcf1b5879aa0150b0511833c52885f5b4c (diff)
downloadkernel_samsung_crespo-2a4a7840c4bf66614b49c2828947f2cccb6ab36f.zip
kernel_samsung_crespo-2a4a7840c4bf66614b49c2828947f2cccb6ab36f.tar.gz
kernel_samsung_crespo-2a4a7840c4bf66614b49c2828947f2cccb6ab36f.tar.bz2
Merge branch 'linux-3.0.y' into HEAD
Conflicts: drivers/net/tun.c
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r--net/ipv4/tcp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 58a944f..31741cf 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -2409,7 +2409,10 @@ static int do_tcp_setsockopt(struct sock *sk, int level,
/* Cap the max timeout in ms TCP will retry/retrans
* before giving up and aborting (ETIMEDOUT) a connection.
*/
- icsk->icsk_user_timeout = msecs_to_jiffies(val);
+ if (val < 0)
+ err = -EINVAL;
+ else
+ icsk->icsk_user_timeout = msecs_to_jiffies(val);
break;
default:
err = -ENOPROTOOPT;