Bluetooth: Queue incoming ACL data until BT_CONNECTED state is reached
authorJohan Hedberg <johan.hedberg@intel.com>
Fri, 17 Jan 2014 18:45:11 +0000 (20:45 +0200)
committerJohan Hedberg <johan.hedberg@intel.com>
Thu, 13 Feb 2014 07:51:36 +0000 (09:51 +0200)
commit61a939c68ee033d43be3aa436d95eb8afdd16142
tree70ee2165a487d8bb8059fd13a9b0fe0d114db534
parent162b49e75cf2c6858852e7a0ae2c2e30e51f0e09
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>
include/net/bluetooth/l2cap.h
net/bluetooth/l2cap_core.c