From 3a3364eef8c613344477b89784d8f9b4299f21b6 Mon Sep 17 00:00:00 2001 From: Ioannis Glaropoulos Date: Fri, 14 Feb 2020 15:32:53 +0100 Subject: [PATCH] kernel: fatal: unlock IRQs in early return points in z_fatal_error We need to unlock IRQs in early return points of z_fatal_error() functions; not only at the normal return point. Signed-off-by: Ioannis Glaropoulos --- kernel/fatal.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/fatal.c b/kernel/fatal.c index eae7ff9f6cf..7917945c992 100644 --- a/kernel/fatal.c +++ b/kernel/fatal.c @@ -156,9 +156,11 @@ void z_fatal_error(unsigned int reason, const z_arch_esf_t *esf) /* Abort the thread only on STACK Sentinel check fail. */ #if defined(CONFIG_STACK_SENTINEL) if (reason != K_ERR_STACK_CHK_FAIL) { + arch_irq_unlock(key); return; } #else + arch_irq_unlock(key); return; #endif /* CONFIG_STACK_SENTINEL */ }