Add check_pgrp_jobc() calls into process exit path.

Both before and after job control adjustments.

Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D26416
This commit is contained in:
Konstantin Belousov 2020-09-16 21:49:19 +00:00
parent 2f5f11f533
commit 182cfe6ff4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=365815

View File

@ -904,6 +904,7 @@ fixjobc_kill(struct proc *p)
pgrp = p->p_pgrp;
PGRP_LOCK_ASSERT(pgrp, MA_NOTOWNED);
SESS_LOCK_ASSERT(pgrp->pg_session, MA_NOTOWNED);
check_pgrp_jobc(pgrp);
/*
* p no longer affects process group orphanage for children.
@ -939,6 +940,8 @@ fixjobc_kill(struct proc *p)
}
LIST_FOREACH(q, &p->p_orphans, p_orphan)
fixjobc_kill_q(p, q, false);
check_pgrp_jobc(pgrp);
}
void