summaryrefslogtreecommitdiff
path: root/net/bluetooth/l2cap_sock.c
diff options
context:
space:
mode:
authorGustavo Padovan <gustavo.padovan@collabora.co.uk>2012-05-28 05:27:55 +0400
committerJohan Hedberg <johan.hedberg@intel.com>2012-06-05 07:34:11 +0400
commit538266929eb7165f92b91eb0f403120fe759e742 (patch)
tree1b8076405a9cf11d1eba612e66c0a35d635b090a /net/bluetooth/l2cap_sock.c
parent0797e01d877b9677d07b89e0776c061df8878f27 (diff)
downloadlinux-538266929eb7165f92b91eb0f403120fe759e742.tar.xz
Bluetooth: Move check for backlog size to l2cap_sock.c
Remove socket specific code from l2cap_core.c Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Acked-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/l2cap_sock.c')
-rw-r--r--net/bluetooth/l2cap_sock.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
index 5563023001c6..d856cc8f22a3 100644
--- a/net/bluetooth/l2cap_sock.c
+++ b/net/bluetooth/l2cap_sock.c
@@ -895,6 +895,12 @@ static struct l2cap_chan *l2cap_sock_new_connection_cb(struct l2cap_chan *chan)
{
struct sock *sk, *parent = chan->data;
+ /* Check for backlog size */
+ if (sk_acceptq_is_full(parent)) {
+ BT_DBG("backlog full %d", parent->sk_ack_backlog);
+ return NULL;
+ }
+
sk = l2cap_sock_alloc(sock_net(parent), NULL, BTPROTO_L2CAP,
GFP_ATOMIC);
if (!sk)