diff options
author | KalimochoAz <calimochoazucarado@gmail.com> | 2012-08-30 21:49:20 +0200 |
---|---|---|
committer | KalimochoAz <calimochoazucarado@gmail.com> | 2012-08-30 21:49:20 +0200 |
commit | 2a4a7840c4bf66614b49c2828947f2cccb6ab36f (patch) | |
tree | a2b98163d6f4ae05a9f0557e484cc120603a42c6 /net/ipv4/tcp.c | |
parent | de60756ed5f5a5c82d5c799850148f68346e5918 (diff) | |
parent | 5aa287dcf1b5879aa0150b0511833c52885f5b4c (diff) | |
download | kernel_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.c | 5 |
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; |