From: Zhu Yi Date: Thu, 4 Mar 2010 18:01:45 +0000 (+0000) Subject: tipc: use limited socket backlog X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=53eecb1be5ae499d399d2923933937a9ea1a284f;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git tipc: use limited socket backlog Make tipc adapt to the limited socket backlog change. Cc: Jon Maloy Cc: Allan Stephens Signed-off-by: Zhu Yi Acked-by: Eric Dumazet Acked-by: Allan Stephens Signed-off-by: David S. Miller --- diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 1ea64f09cc45..22bfbc33a8ac 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -1322,8 +1322,10 @@ static u32 dispatch(struct tipc_port *tport, struct sk_buff *buf) if (!sock_owned_by_user(sk)) { res = filter_rcv(sk, buf); } else { - sk_add_backlog(sk, buf); - res = TIPC_OK; + if (sk_add_backlog_limited(sk, buf)) + res = TIPC_ERR_OVERLOAD; + else + res = TIPC_OK; } bh_unlock_sock(sk);