diff options
author | Zhu Yi <yi.zhu@intel.com> | 2010-03-04 18:01:45 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-04-01 16:02:04 -0700 |
commit | c531ab23d0b83b6018c5f137c4093771267f505b (patch) | |
tree | b15cc3aebc3ca0a74f9155e18f59896db254d921 /net | |
parent | 37d60aa805fad7d4edd06612569fbbe365a5bb20 (diff) |
tipc: use limited socket backlog
[ Upstream commit 53eecb1be5ae499d399d2923933937a9ea1a284f ]
Make tipc adapt to the limited socket backlog change.
Cc: Jon Maloy <jon.maloy@ericsson.com>
Cc: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'net')
-rw-r--r-- | 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 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); |