Skip to content

Commit b2eb415

Browse files
committed
[nrf noup] Bluetooth: Host: deadlock fix testing.
This is just to test a still open PR on RTOS Zephyr. Signed-off-by: Kyra Lengfeld <[email protected]>
1 parent 7fe2732 commit b2eb415

File tree

1 file changed

+7
-1
lines changed
  • subsys/bluetooth/host

1 file changed

+7
-1
lines changed

subsys/bluetooth/host/att.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,13 @@ static struct net_buf *bt_att_chan_create_pdu(struct bt_att_chan *chan, uint8_t
721721
timeout = BT_ATT_TIMEOUT;
722722
break;
723723
default:
724-
if (k_current_get() == k_work_queue_thread_get(&k_sys_work_q)) {
724+
k_tid_t current_thread = k_current_get();
725+
726+
if (current_thread == k_work_queue_thread_get(&k_sys_work_q)) {
727+
/* No blocking in the sysqueue. */
728+
timeout = K_NO_WAIT;
729+
} else if (current_thread == att_handle_rsp_thread) {
730+
/* Blocking would cause deadlock. */
725731
timeout = K_NO_WAIT;
726732
} else {
727733
timeout = K_FOREVER;

0 commit comments

Comments
 (0)