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
This commit is contained in:
parent
1f175550a0
commit
4f4c35bb38
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user