From 4ef859924bec0b0bfa5f0f8c03ae45c49154c84b Mon Sep 17 00:00:00 2001 From: Abdelatif Guettouche Date: Tue, 24 Aug 2021 16:57:36 +0200 Subject: [PATCH] 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 --- 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 d2205f7a8a2..b4d7dda278d 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 }