Author: kib
Date: Sat Jul 15 06:38:01 2017
New Revision: 321005
URL: https://svnweb.freebsd.org/changeset/base/321005

Log:
  MFC r320804:
  Fix handling of one more possible exception on return to usermode.

Modified:
  stable/10/sys/i386/i386/trap.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/i386/i386/trap.c
==============================================================================
--- stable/10/sys/i386/i386/trap.c      Sat Jul 15 06:33:39 2017        
(r321004)
+++ stable/10/sys/i386/i386/trap.c      Sat Jul 15 06:38:01 2017        
(r321005)
@@ -567,11 +567,7 @@ trap(struct trapframe *frame)
                                        vm86_trap((struct vm86frame *)frame);
                                goto out;
                        }
-                       if (type == T_STKFLT)
-                               break;
-
                        /* FALL THROUGH */
-
                case T_SEGNPFLT:        /* segment not present fault */
                        if (curpcb->pcb_flags & PCB_VM86CALL)
                                break;
@@ -612,6 +608,9 @@ trap(struct trapframe *frame)
                                frame->tf_eip = (int)doreti_iret_fault;
                                goto out;
                        }
+                       if (type == T_STKFLT)
+                               break;
+
                        if (frame->tf_eip == (int)doreti_popl_ds) {
                                frame->tf_eip = (int)doreti_popl_ds_fault;
                                goto out;
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to