summaryrefslogtreecommitdiff
path: root/net/bluetooth/mgmt.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2013-04-29 19:35:45 +0300
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>2013-06-23 00:23:49 +0100
commit44f3b0fbaa9bfa7a88577ee8c446d0a78cb1d73a (patch)
treedff8bc6ec80a81799e66dc8bb6cf285112ee5235 /net/bluetooth/mgmt.c
parent0cc59a72c723979cf8973aff4df874a5f7a697c7 (diff)
Bluetooth: Fix multiple LE socket handling
The LE ATT server socket needs to be superseded by any ATT client sockets. Previously this was done by looking at the hcon->out variable (indicating whether the connection is outgoing or incoming) which is a too crude way of determining whether the server socket needs to be picked or not (an outgoing connection doesn't necessarily mean that an ATT client socket has triggered it). This patch extends the ATT server socket lookup function (l2cap_le_conn_ready) to be used for all LE connections (regardless of the hcon->out value) and adds an internal check into the function for the existence of any ATT client sockets (in which case the server socket should be skipped). For this to work reliably all lookups must be done while the l2cap_conn->chan_lock is held, meaning also that the call to l2cap_chan_add needs to be changed to its lockless __l2cap_chan_add counterpart. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'net/bluetooth/mgmt.c')
0 files changed, 0 insertions, 0 deletions