[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111113201849.GF1362@elgon.mountain>
Date: Sun, 13 Nov 2011 23:18:49 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: stable@...r.kernel.org
Cc: Greg Kroah-Hartman <greg@...ah.com>, Zhu Yi <yi.zhu@...el.com>,
netdev@...r.kernel.org, Eric Dumazet <eric.dumazet@...il.com>
Subject: [patch 5/8 2.6.32] tipc: use limited socket backlog
This applied without changes to the original patch.
>From 53eecb1be5ae499d399d2923933937a9ea1a284f Mon Sep 17 00:00:00 2001
From: Zhu Yi <yi.zhu@...el.com>
Date: Thu, 4 Mar 2010 18:01:45 +0000
Subject: [PATCH] tipc: use limited socket backlog
Make tipc adapt to the limited socket backlog change.
Cc: Jon Maloy <jon.maloy@...csson.com>
Cc: Allan Stephens <allan.stephens@...driver.com>
Signed-off-by: Zhu Yi <yi.zhu@...el.com>
Acked-by: Eric Dumazet <eric.dumazet@...il.com>
Acked-by: Allan Stephens <allan.stephens@...driver.com>
Signed-off-by: David S. Miller <davem@...emloft.net>
Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
---
net/tipc/socket.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index 1ea64f0..22bfbc3 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);
--
1.7.8.rc0.dirty
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists