diff --git a/subsys/bluetooth/host/att.c b/subsys/bluetooth/host/att.c index c3fd0a8a7cf..9d83ba688d9 100644 --- a/subsys/bluetooth/host/att.c +++ b/subsys/bluetooth/host/att.c @@ -721,7 +721,13 @@ static struct net_buf *bt_att_chan_create_pdu(struct bt_att_chan *chan, uint8_t timeout = BT_ATT_TIMEOUT; break; default: - if (k_current_get() == k_work_queue_thread_get(&k_sys_work_q)) { + k_tid_t current_thread = k_current_get(); + + if (current_thread == k_work_queue_thread_get(&k_sys_work_q)) { + /* No blocking in the sysqueue. */ + timeout = K_NO_WAIT; + } else if (current_thread == att_handle_rsp_thread) { + /* Blocking would cause deadlock. */ timeout = K_NO_WAIT; } else { timeout = K_FOREVER;