Skip to content
Commit 322d4c1f authored by Jordan Yates's avatar Jordan Yates Committed by Carles Cufí
Browse files

bluetooth: hci: spi: avoid `rxmsg` re-use



Don't re-use the `rxmsg` buffer in the `bt_spi_send` function. This
buffer is still used by the RX thread after releasing the SPI semaphore.
The current re-use can result in buffer corruption if the RX thread is
swapped out as a result of the `k_sem_give`.

Moving the semaphore release later can result in deadlocks due to
buffer allocation being performed while holding the semaphore, so
instead just eliminate the re-use entirely.

Signed-off-by: default avatarJordan Yates <jordan.yates@data61.csiro.au>
parent 00e67753
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment