summaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2014-01-17 19:45:11 +0100
committerJohan Hedberg <johan.hedberg@intel.com>2014-02-13 08:51:36 +0100
commit61a939c68ee033d43be3aa436d95eb8afdd16142 (patch)
tree70ee2165a487d8bb8059fd13a9b0fe0d114db534 /include/net
parentBluetooth: Reorder L2CAP functions to avoid forward declarations (diff)
downloadlinux-61a939c68ee033d43be3aa436d95eb8afdd16142.tar.xz
linux-61a939c68ee033d43be3aa436d95eb8afdd16142.zip
Bluetooth: Queue incoming ACL data until BT_CONNECTED state is reached
This patch adds a queue for incoming L2CAP data that's received before l2cap_connect_cfm is called and processes the data once l2cap_connect_cfm is called. This way we ensure that we have e.g. all remote features before processing L2CAP signaling data (which is very important for making the correct security decisions). The processing of the pending rx data needs to be done through queue_work since unlike l2cap_recv_acldata, l2cap_connect_cfm is called with the hci_dev lock held which could cause potential deadlocks. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/bluetooth/l2cap.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index c695083eee2b..85cf40acc47e 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -624,6 +624,9 @@ struct l2cap_conn {
__u32 rx_len;
__u8 tx_ident;
+ struct sk_buff_head pending_rx;
+ struct work_struct pending_rx_work;
+
__u8 disc_reason;
struct delayed_work security_timer;