summaryrefslogtreecommitdiff
path: root/net/bluetooth/l2cap_core.c
diff options
context:
space:
mode:
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>2012-02-21 14:54:56 +0400
committerJohan Hedberg <johan.hedberg@intel.com>2012-02-23 15:06:58 +0400
commitc03b355ea2938495bbdf25a4645be545be8890f4 (patch)
treec3f0516e08150f724a84787330439729f1f38c1b /net/bluetooth/l2cap_core.c
parent3df91ea20e744344100b10ae69a17211fcf5b207 (diff)
downloadlinux-c03b355ea2938495bbdf25a4645be545be8890f4.tar.xz
Bluetooth: Add l2cap_chan_lock
Channel lock will be used to lock L2CAP channels which are locked currently by socket locks. Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Reviewed-by: Ulisses Furquim <ulisses@profusion.mobi> Acked-by: Gustavo F. Padovan <padovan@profusion.mobi> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth/l2cap_core.c')
-rw-r--r--net/bluetooth/l2cap_core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 8e8e9e93fb34..e39eba1ac4da 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -247,6 +247,8 @@ struct l2cap_chan *l2cap_chan_create(struct sock *sk)
if (!chan)
return NULL;
+ mutex_init(&chan->lock);
+
chan->sk = sk;
write_lock(&chan_list_lock);