svn commit: r302613 - head/sys/kern
Konstantin Belousov
kib at FreeBSD.org
Tue Jul 12 03:52:07 UTC 2016
Author: kib
Date: Tue Jul 12 03:52:05 2016
New Revision: 302613
URL: https://svnweb.freebsd.org/changeset/base/302613
Log:
Add assert to complement r302328.
AST must not execute with TDF_SBDRY or TDF_SEINTR/TDF_SERESTART thread
flags set, which is asserted in userret(). As the consequence, -1 return
from cursig() must not be possible.
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Modified:
head/sys/kern/subr_trap.c
Modified: head/sys/kern/subr_trap.c
==============================================================================
--- head/sys/kern/subr_trap.c Tue Jul 12 03:38:29 2016 (r302612)
+++ head/sys/kern/subr_trap.c Tue Jul 12 03:52:05 2016 (r302613)
@@ -274,8 +274,10 @@ ast(struct trapframe *framep)
!SIGISEMPTY(p->p_siglist)) {
PROC_LOCK(p);
mtx_lock(&p->p_sigacts->ps_mtx);
- while ((sig = cursig(td)) != 0)
+ while ((sig = cursig(td)) != 0) {
+ KASSERT(sig >= 0, ("sig %d", sig));
postsig(sig);
+ }
mtx_unlock(&p->p_sigacts->ps_mtx);
PROC_UNLOCK(p);
}
More information about the svn-src-all
mailing list