You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ma...@apache.org on 2021/09/09 10:35:30 UTC
[incubator-nuttx] 02/02: esp32_serial.c: Release the spinlock
before calling uart_xmitchars,
this functions will call esp32_txint again which leads to deadlock since
esp32_txint has already locked the spinlock.
This is an automated email from the ASF dual-hosted git repository.
masayuki pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 4ef859924bec0b0bfa5f0f8c03ae45c49154c84b
Author: Abdelatif Guettouche <ab...@espressif.com>
AuthorDate: Tue Aug 24 16:57:36 2021 +0200
esp32_serial.c: Release the spinlock before calling uart_xmitchars, this
functions will call esp32_txint again which leads to deadlock since
esp32_txint has already locked the spinlock.
Signed-off-by: Abdelatif Guettouche <ab...@espressif.com>
---
arch/xtensa/src/esp32/esp32_serial.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/xtensa/src/esp32/esp32_serial.c b/arch/xtensa/src/esp32/esp32_serial.c
index d2205f7..b4d7dda 100644
--- a/arch/xtensa/src/esp32/esp32_serial.c
+++ b/arch/xtensa/src/esp32/esp32_serial.c
@@ -1733,6 +1733,7 @@ static void esp32_txint(struct uart_dev_s *dev, bool enable)
* interrupts disabled (note this may recurse).
*/
+ spin_unlock_irqrestore(&priv->lock, flags);
uart_xmitchars(dev);
#endif
}