zephyr/subsys/bluetooth
Jonathan Rico 76015745df Bluetooth: ATT: lock scheduler when sending from user thread
`att_req_send_process` is not thread safe.

In the case where the current context is pre-emptible (e.g. when a user
sends something over GATT from the main thread):

The iterator in `att_req_send_process` can get interrupted mid-processing,
breaking the logic and resulting in an assert/crash/data corruption.

Additionally, the connection state check in this fn is also not
thread-safe, the RX thread could pre-empt us and disconnect right before
we attempt to send on an ATT bearer that is on it.

This is a hotfix until we have a generalized solution for the host API
surface. It seems a lot of our logic assumes cooperative priority.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-03-07 11:16:55 +02:00
..
audio Bluetooth: BAP: Add can_recv to bt_bap_ep_info 2024-03-04 14:05:07 +01:00
common bluetooth: mesh: Doc fix Bluetooth mesh to Mesh 2023-12-01 10:56:18 +00:00
controller Bluetooth: Controller: Build hci_vendor.c also for simulation 2024-03-04 12:14:15 +00:00
crypto Bluetooth: Logging: Move all logging symbols together 2023-03-28 10:33:24 +02:00
host Bluetooth: ATT: lock scheduler when sending from user thread 2024-03-07 11:16:55 +02:00
lib Bluetooth: Host: Remove 'Experimental' flag of EAD 2023-07-28 17:48:16 +02:00
mesh Bluetooth: Mesh: Add missing model extensions 2024-03-06 10:21:59 +00:00
services Bluetooth: services: Add HRS notification changed app callback 2024-01-08 15:34:20 +02:00
shell Bluetooth: ISO: Add CONFIG_BT_ISO_{RX/TX} 2024-03-02 15:05:39 +01:00
CMakeLists.txt Bluetooth: Host: Add Encrypted Advertising Data 2023-03-21 13:39:09 +02:00
Kconfig Bluetooth: ISO: Add CONFIG_BT_ISO_{RX/TX} 2024-03-02 15:05:39 +01:00
Kconfig.adv Bluetooth: Host: Add support for PAwR Sync 2023-04-26 20:08:16 +02:00
Kconfig.iso Bluetooth: ISO: Add CONFIG_BT_ISO_{RX/TX} 2024-03-02 15:05:39 +01:00
Kconfig.logging Bluetooth: Audio: Add implementation for PBP and dedicated sample apps. 2024-01-09 09:59:23 +01:00