Index: kernel/arch/arm32/src/ras.c
===================================================================
--- kernel/arch/arm32/src/ras.c	(revision ab52a3eecc1b2f233980f13b139dc8d7ef4a416e)
+++ kernel/arch/arm32/src/ras.c	(revision 8c95dff74a31d0b98e3e8fb115185a07e64c2ac2)
@@ -67,5 +67,6 @@
 void ras_check(unsigned int n, istate_t *istate)
 {
-	bool restart = false;
+	bool restart_needed = false;
+	uintptr_t restart_pc = 0;
 
 	if (istate_from_uspace(istate)) {
@@ -73,5 +74,6 @@
 			if ((ras_page[RAS_START] < istate->pc) &&
 			    (ras_page[RAS_END] > istate->pc)) {
-				restart = true;
+				restart_needed = true;
+				restart_pc = ras_page[RAS_START];
 			}
 			ras_page[RAS_START] = 0;
@@ -81,6 +83,6 @@
 
 	exc_dispatch(n, istate);
-	if (restart)
-		istate->pc = ras_page[RAS_START];
+	if (restart_needed)
+		istate->pc = restart_pc;
 }
 
