subsys: bluetooth: host: Ensure PDUs are not allocated in ISR
`bt_conn_create_pdu()` must not be called in ISR has the call might be blocking. Signed-off-by: Olivier Martin <olivier.martin@proglove.de>
This commit is contained in:
parent
45a394e805
commit
c3118e66ee
1 changed files with 6 additions and 0 deletions
|
@ -1943,6 +1943,12 @@ struct net_buf *bt_conn_create_pdu(struct net_buf_pool *pool, size_t reserve)
|
|||
{
|
||||
struct net_buf *buf;
|
||||
|
||||
/*
|
||||
* PDU must not be allocated from ISR as we block with 'K_FOREVER'
|
||||
* during the allocation
|
||||
*/
|
||||
__ASSERT_NO_MSG(!k_is_in_isr());
|
||||
|
||||
if (!pool) {
|
||||
pool = &acl_tx_pool;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue