diff options
author | Zhu Yi <yi.zhu@intel.com> | 2010-03-04 18:01:42 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-03-05 13:34:00 -0800 |
commit | 55349790d7cbf0d381873a7ece1dcafcffd4aaa9 (patch) | |
tree | 2f5cc194b8d7b2fd559c24fe2dfd946535923daa /net/ipv4 | |
parent | 6b03a53a5ab7ccf2d5d69f96cf1c739c4d2a8fb9 (diff) | |
download | linux-55349790d7cbf0d381873a7ece1dcafcffd4aaa9.tar.bz2 |
udp: use limited socket backlog
Make udp 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/ipv4')
-rw-r--r-- | net/ipv4/udp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 608a5446d05b..e7eb47f338d4 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -1371,8 +1371,10 @@ int udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) bh_lock_sock(sk); if (!sock_owned_by_user(sk)) rc = __udp_queue_rcv_skb(sk, skb); - else - sk_add_backlog(sk, skb); + else if (sk_add_backlog_limited(sk, skb)) { + bh_unlock_sock(sk); + goto drop; + } bh_unlock_sock(sk); return rc; |