OSDN Git Service

GATT: Initiate L2CAP disconnect only when the channel is open
authorvenkata Jagadeesh <vjagad@codeaurora.org>
Thu, 26 Nov 2015 08:44:00 +0000 (14:14 +0530)
committerAndre Eisenbach <eisenbach@google.com>
Fri, 25 Mar 2016 20:15:41 +0000 (13:15 -0700)
commit94145fae3cebe35a4b48a519e0ddee82d0bbc3c7
tree150e91f8bfb61a6d8fe3da38a80e508053fc2fbd
parentc83ad356a65f7d639d628e2feec927619b07683e
GATT: Initiate L2CAP disconnect only when the channel is open

Use case:
Crash found during L2CAP disconnect from faulty BLE APP.

Steps:
Run SNS testing.

Failure:
Crash during L2CAP disc.

Root cause:
Faulty BLE application triggering GATT disconnection
which internally triggering L2CAP disconnection without checking
proper state of channel.

Fix:
- Initiate L2CAP disconnect only when the channel is open
- Validate LCB during disconnection from upper layers

Bug: 27852645
Change-Id: Ic9d065f095feba659c861828732647e968c20db8
stack/gatt/gatt_main.c
stack/l2cap/l2c_utils.c