From eb240e014c98752a0088e2c6e0768cfb5ed131cf Mon Sep 17 00:00:00 2001 From: Carlos Sanchez Date: Mon, 9 Jan 2023 16:01:19 +0100 Subject: [PATCH] stm32: protect TX buffer during CAN error frame generation. --- arch/arm/src/stm32/stm32_fdcan_sock.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/src/stm32/stm32_fdcan_sock.c b/arch/arm/src/stm32/stm32_fdcan_sock.c index debf7d0087..6f7c4f586b 100644 --- a/arch/arm/src/stm32/stm32_fdcan_sock.c +++ b/arch/arm/src/stm32/stm32_fdcan_sock.c @@ -2122,7 +2122,9 @@ static void fdcan_error_work(void *arg) /* Report errors */ + net_lock(); fdcan_error(priv, pending & FDCAN_ANYERR_INTS); + net_unlock(); /* Re-enable ERROR interrupts */