netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zhu Yi <yi.zhu@intel.com>
To: netdev@vger.kernel.org
Cc: Zhu Yi <yi.zhu@intel.com>,
	Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Subject: [PATCH 5/8] llc: use limited socket backlog
Date: Wed,  3 Mar 2010 14:35:08 +0800	[thread overview]
Message-ID: <1267598111-12503-5-git-send-email-yi.zhu@intel.com> (raw)
In-Reply-To: <1267598111-12503-4-git-send-email-yi.zhu@intel.com>

Make llc adapt to the limited socket backlog change.

Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
---
 net/llc/llc_c_ac.c |    2 +-
 net/llc/llc_conn.c |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/net/llc/llc_c_ac.c b/net/llc/llc_c_ac.c
index 019c780..86d6985 100644
--- a/net/llc/llc_c_ac.c
+++ b/net/llc/llc_c_ac.c
@@ -1437,7 +1437,7 @@ static void llc_process_tmr_ev(struct sock *sk, struct sk_buff *skb)
 			llc_conn_state_process(sk, skb);
 		else {
 			llc_set_backlog_type(skb, LLC_EVENT);
-			sk_add_backlog(sk, skb);
+			__sk_add_backlog(sk, skb);
 		}
 	}
 }
diff --git a/net/llc/llc_conn.c b/net/llc/llc_conn.c
index a8dde9b..a12144d 100644
--- a/net/llc/llc_conn.c
+++ b/net/llc/llc_conn.c
@@ -827,7 +827,8 @@ void llc_conn_handler(struct llc_sap *sap, struct sk_buff *skb)
 	else {
 		dprintk("%s: adding to backlog...\n", __func__);
 		llc_set_backlog_type(skb, LLC_PACKET);
-		sk_add_backlog(sk, skb);
+		if (sk_add_backlog(sk, skb))
+			goto drop_unlock;
 	}
 out:
 	bh_unlock_sock(sk);
-- 
1.6.3.3


  reply	other threads:[~2010-03-03  6:33 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-03  6:35 [PATCH 1/8] net: add limit for socket backlog Zhu Yi
2010-03-03  6:35 ` [PATCH 2/8] dccp: use limited " Zhu Yi
2010-03-03  6:35   ` [PATCH 3/8] tcp: " Zhu Yi
2010-03-03  6:35     ` [PATCH 4/8] udp: " Zhu Yi
2010-03-03  6:35       ` Zhu Yi [this message]
2010-03-03  6:35         ` [PATCH 6/8] sctp: " Zhu Yi
2010-03-03  6:35           ` [PATCH 7/8] tipc: " Zhu Yi
2010-03-03  6:35             ` [PATCH 8/8] x25: " Zhu Yi
2010-03-03  7:08               ` Eric Dumazet
2010-03-03 11:38                 ` andrew hendry
2010-03-03 14:00                   ` Zhu, Yi
2010-03-03 14:33                     ` Eric Dumazet
2010-03-03 22:44                       ` andrew hendry
2010-03-03  6:56   ` [PATCH 2/8] dccp: " Eric Dumazet
2010-03-03  7:43     ` Zhu Yi
2010-03-03  6:54 ` [PATCH 1/8] net: add limit for " Eric Dumazet
2010-03-03  7:35   ` Zhu Yi
2010-03-03  8:02     ` Eric Dumazet
2010-03-03  8:14       ` Zhu Yi
2010-03-03  8:47         ` Eric Dumazet
2010-03-03  8:59           ` Zhu Yi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1267598111-12503-5-git-send-email-yi.zhu@intel.com \
    --to=yi.zhu@intel.com \
    --cc=acme@ghostprotocols.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).