diff options
author | Zhu Yi <yi.zhu@intel.com> | 2010-03-04 18:01:41 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-03-05 13:34:00 -0800 |
commit | 6b03a53a5ab7ccf2d5d69f96cf1c739c4d2a8fb9 (patch) | |
tree | e16e367dd5365c707ecc7373c593da4922d6c8d6 /net/ipv6/tcp_ipv6.c | |
parent | 8eae939f1400326b06d0c9afe53d2a484a326871 (diff) | |
download | lwn-6b03a53a5ab7ccf2d5d69f96cf1c739c4d2a8fb9.tar.gz lwn-6b03a53a5ab7ccf2d5d69f96cf1c739c4d2a8fb9.zip |
tcp: use limited socket backlog
Make tcp adapt to the limited socket backlog change.
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Cc: "Pekka Savola (ipv6)" <pekkas@netcore.fi>
Cc: Patrick McHardy <kaber@trash.net>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/tcp_ipv6.c')
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 6963a6b6763e..c4ea9d5cbfaa 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c @@ -1740,8 +1740,10 @@ process: if (!tcp_prequeue(sk, skb)) ret = tcp_v6_do_rcv(sk, skb); } - } else - sk_add_backlog(sk, skb); + } else if (sk_add_backlog_limited(sk, skb)) { + bh_unlock_sock(sk); + goto discard_and_relse; + } bh_unlock_sock(sk); sock_put(sk); |