aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/l2cap_sock.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
index f59e00c2daa9..34d62348084d 100644
--- a/net/bluetooth/l2cap_sock.c
+++ b/net/bluetooth/l2cap_sock.c
@@ -1180,13 +1180,16 @@ static struct l2cap_chan *l2cap_sock_new_connection_cb(struct l2cap_chan *chan)
1180 /* Check for backlog size */ 1180 /* Check for backlog size */
1181 if (sk_acceptq_is_full(parent)) { 1181 if (sk_acceptq_is_full(parent)) {
1182 BT_DBG("backlog full %d", parent->sk_ack_backlog); 1182 BT_DBG("backlog full %d", parent->sk_ack_backlog);
1183 release_sock(parent);
1183 return NULL; 1184 return NULL;
1184 } 1185 }
1185 1186
1186 sk = l2cap_sock_alloc(sock_net(parent), NULL, BTPROTO_L2CAP, 1187 sk = l2cap_sock_alloc(sock_net(parent), NULL, BTPROTO_L2CAP,
1187 GFP_ATOMIC); 1188 GFP_ATOMIC);
1188 if (!sk) 1189 if (!sk) {
1190 release_sock(parent);
1189 return NULL; 1191 return NULL;
1192 }
1190 1193
1191 bt_sock_reclassify_lock(sk, BTPROTO_L2CAP); 1194 bt_sock_reclassify_lock(sk, BTPROTO_L2CAP);
1192 1195