mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
udp: use limited socket backlog
Make udp adapt to the limited socket backlog change. Cc: "David S. Miller" <[email protected]> Cc: Alexey Kuznetsov <[email protected]> Cc: "Pekka Savola (ipv6)" <[email protected]> Cc: Patrick McHardy <[email protected]> Signed-off-by: Zhu Yi <[email protected]> Acked-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
6b03a53a5a
commit
55349790d7
2 changed files with 22 additions and 12 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue