From 0bbb25b17831b0bdc81a021366f3b9b8c0a258af Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 7 Mar 2024 07:40:25 +0100 Subject: [PATCH] bsps: Disable interrupts in fatal extension --- bsps/shared/start/bspfatal-default.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/bsps/shared/start/bspfatal-default.c b/bsps/shared/start/bspfatal-default.c index 557a0960fa..4e2b02773b 100644 --- a/bsps/shared/start/bspfatal-default.c +++ b/bsps/shared/start/bspfatal-default.c @@ -49,6 +49,16 @@ void bsp_fatal_extension( rtems_fatal_code code ) { + rtems_interrupt_level level; + + /* + * Make sure that interrupts don't interfere with the fatal error handling on + * this processor. This reduces the likelihood to end up in a recursive + * fatal error handling sequence. + */ + rtems_interrupt_local_disable( level ); + (void) level; + #if BSP_VERBOSE_FATAL_EXTENSION Thread_Control *executing; const char* TYPE = "*** FATAL ***";