diff --git a/src/userprog/exception.c b/src/userprog/exception.c index 7b8d3ee..6c707b1 100644 --- a/src/userprog/exception.c +++ b/src/userprog/exception.c @@ -177,7 +177,10 @@ page_fault (struct intr_frame *f) } } else - { + { + /* Allows for stack growth in kernel context, due to syscall failure */ + if (handle_stack_fault (fault_addr, thread_current ()->curr_esp)) return; + f->eip = (void *)f->eax; f->eax = 0xffffffff; return;