| Submitter | Zhu Yi |
|---|---|
| Date | March 5, 2010, 4:01 a.m. |
| Message ID | <1267761707-15605-6-git-send-email-yi.zhu@intel.com> |
| Download | mbox | patch |
| Permalink | /patch/46992/ |
| State | Accepted |
| Delegated to: | David Miller |
| Headers | show |
Comments
Le vendredi 05 mars 2010 à 12:01 +0800, Zhu Yi a écrit : > 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> > --- > net/tipc/socket.c | 6 ++++-- > 1 files changed, 4 insertions(+), 2 deletions(-) Acked-by: Eric Dumazet <eric.dumazet@gmail.com> -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
> > 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> From visual inspection and basic sanity testing: Acked-by: Allan Stephens <allan.stephens@windriver.com> Nice work! -- Al -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Patch
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);
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> --- net/tipc/socket.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)