Author: kib
Date: Mon Oct 10 12:27:40 2011
New Revision: 226202
URL: http://svn.freebsd.org/changeset/base/226202

Log:
  MFC r225942:
  Assert that exiting process does not return to usermode.
  
  Approved by:  re (bz)

Modified:
  stable/9/sys/kern/subr_trap.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/kern/subr_trap.c
==============================================================================
--- stable/9/sys/kern/subr_trap.c       Mon Oct 10 12:16:45 2011        
(r226201)
+++ stable/9/sys/kern/subr_trap.c       Mon Oct 10 12:27:40 2011        
(r226202)
@@ -99,6 +99,8 @@ userret(struct thread *td, struct trapfr
 
        CTR3(KTR_SYSC, "userret: thread %p (pid %d, %s)", td, p->p_pid,
             td->td_name);
+       KASSERT((p->p_flag & P_WEXIT) == 0,
+           ("Exiting process returns to usermode"));
 #if 0
 #ifdef DIAGNOSTIC
        /* Check that we called signotify() enough. */
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to