diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index ac35944da942..12570e0b7b13 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -751,9 +751,11 @@ pgadjustjobc(struct pgrp *pgrp, int entering) { PGRP_LOCK(pgrp); - if (entering) + if (entering) { + MPASS(pgrp->pg_jobc >= 0); pgrp->pg_jobc++; - else { + } else { + MPASS(pgrp->pg_jobc > 0); --pgrp->pg_jobc; if (pgrp->pg_jobc == 0) orphanpg(pgrp);