summaryrefslogtreecommitdiff
path: root/net/tipc
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2012-04-22 23:34:26 +0000
committerDavid S. Miller <davem@davemloft.net>2012-04-23 22:28:28 -0400
commitf545a38f74584cc7424cb74f792a00c6d2589485 (patch)
treeb272cbfed3267a7750f55f23989e1b070ae6ac3e /net/tipc
parentb98985073bc5403ef1320866e4ef8bbc5d587ceb (diff)
downloadlinux-3.10-f545a38f74584cc7424cb74f792a00c6d2589485.tar.gz
linux-3.10-f545a38f74584cc7424cb74f792a00c6d2589485.tar.bz2
linux-3.10-f545a38f74584cc7424cb74f792a00c6d2589485.zip
net: add a limit parameter to sk_add_backlog()
sk_add_backlog() & sk_rcvqueues_full() hard coded sk_rcvbuf as the memory limit. We need to make this limit a parameter for TCP use. No functional change expected in this patch, all callers still using the old sk_rcvbuf limit. Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Neal Cardwell <ncardwell@google.com> Cc: Tom Herbert <therbert@google.com> Cc: Maciej Żenczykowski <maze@google.com> Cc: Yuchung Cheng <ycheng@google.com> Cc: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Cc: Rick Jones <rick.jones2@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc')
-rw-r--r--net/tipc/socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index c19fc4a228a..6d4991e8f67 100644
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@ -1330,7 +1330,7 @@ static u32 dispatch(struct tipc_port *tport, struct sk_buff *buf)
if (!sock_owned_by_user(sk)) {
res = filter_rcv(sk, buf);
} else {
- if (sk_add_backlog(sk, buf))
+ if (sk_add_backlog(sk, buf, sk->sk_rcvbuf))
res = TIPC_ERR_OVERLOAD;
else
res = TIPC_OK;