Bluetooth: controller: split: Fix data PDU leak during ctrl PDU defer

Fix a bug where in tx data PDU enqueued, while a ctrl PDU is
deferred due to Encryption setup being in progress, is
leaked causing HCI Tx Buffer Overflow crash.

Relates to commit 671ccc4b0ee6 ("Bluetooth: controller: Fix
data PDU leak during ctrl PDU defer").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
Vinayak Kariappa Chettimada 2019-09-06 14:42:38 +05:30 committed by Carles Cufí
commit 7f0a95468a

View file

@ -1814,6 +1814,11 @@ static void ctrl_tx_sec_enqueue(struct ll_conn *conn, struct node_tx *tx)
tx->next = conn->tx_ctrl_last->next;
conn->tx_ctrl_last->next = tx;
}
/* Update last pointer if ctrl added at end of tx list */
if (!tx->next) {
conn->tx_data_last = tx;
}
} else
#endif /* CONFIG_BT_CTLR_LE_ENC */