summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--i386/i386/locore.S5
1 files changed, 5 insertions, 0 deletions
diff --git a/i386/i386/locore.S b/i386/i386/locore.S
index c1e6448..d2c600a 100644
--- a/i386/i386/locore.S
+++ b/i386/i386/locore.S
@@ -704,6 +704,8 @@ LEXT(return_to_iret) /* ( label for kdb_kintr and hardclock) */
iret /* return to caller */
int_from_intstack:
+ cmpl $EXT(_intstack),%esp /* seemingly looping? */
+ jb stack_overflowed /* if not: */
call EXT(interrupt) /* call interrupt routine */
_return_to_iret_i: /* ( label for kdb_kintr) */
pop %edx /* must have been on kernel segs */
@@ -711,6 +713,9 @@ _return_to_iret_i: /* ( label for kdb_kintr) */
pop %eax /* no ASTs */
iret
+stack_overflowed:
+ ud2
+
/*
* Take an AST from an interrupt.
* On PCB stack.