You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/07/04 05:36:14 UTC
[incubator-nuttx] 01/13: arch: cxd56xx: Fix getting stuck by nested
spinlock in serial
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit cb6ad9dfbd98c407c17aafcb7a1beb9b7e41d8c1
Author: SPRESENSE <41...@users.noreply.github.com>
AuthorDate: Sun Jul 4 12:51:53 2021 +0900
arch: cxd56xx: Fix getting stuck by nested spinlock in serial
Fix an issue the serial console gets stuck in SMP caused by nested
spin_lock_irqsave.
---
arch/arm/src/cxd56xx/cxd56_serial.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/src/cxd56xx/cxd56_serial.c b/arch/arm/src/cxd56xx/cxd56_serial.c
index 4f62145f..5ece1db 100644
--- a/arch/arm/src/cxd56xx/cxd56_serial.c
+++ b/arch/arm/src/cxd56xx/cxd56_serial.c
@@ -862,11 +862,11 @@ static int up_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
#endif
priv->baud = cfgetispeed(termiosp);
+ spin_unlock_irqrestore(&priv->lock, flags);
+
/* Configure the UART line format and speed. */
up_set_format(dev);
-
- spin_unlock_irqrestore(&priv->lock, flags);
}
break;
#endif