summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/l2cap_sock.c
diff options
context:
space:
mode:
authorJohn W. Linville2014-06-05 20:10:07 +0200
committerJohn W. Linville2014-06-05 20:10:07 +0200
commit67be1e4f4b0a512f6af3a7db681ae9b62d31de5e (patch)
tree690ef67ff6b630344e8fd86c7c84b0d31f468f24 /net/bluetooth/l2cap_sock.c
parentwil6210: improve debug for WMI receive (diff)
parentBluetooth: Fix L2CAP deadlock (diff)
downloadkernel-qcow2-linux-67be1e4f4b0a512f6af3a7db681ae9b62d31de5e.tar.gz
kernel-qcow2-linux-67be1e4f4b0a512f6af3a7db681ae9b62d31de5e.tar.xz
kernel-qcow2-linux-67be1e4f4b0a512f6af3a7db681ae9b62d31de5e.zip
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next
Diffstat (limited to 'net/bluetooth/l2cap_sock.c')
-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 ef5e5b04f34f..ade3fb4c23bc 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)
/* Check for backlog size */
if (sk_acceptq_is_full(parent)) {
BT_DBG("backlog full %d", parent->sk_ack_backlog);
+ release_sock(parent);
return NULL;
}
sk = l2cap_sock_alloc(sock_net(parent), NULL, BTPROTO_L2CAP,
GFP_ATOMIC);
- if (!sk)
+ if (!sk) {
+ release_sock(parent);
return NULL;
+ }
bt_sock_reclassify_lock(sk, BTPROTO_L2CAP);