aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_exit.c
diff options
context:
space:
mode:
authorMateusz Guzik <mjg@FreeBSD.org>2022-03-10 18:42:37 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2022-09-05 11:54:47 +0000
commit5ecb5444aa349246568dc6f9a615630e29191f7c (patch)
treebdec8359fe747ad17739ee587aea6109730816aa /sys/kern/kern_exit.c
parent4bccbf03d81b2bafb93c1674eaa2f70e7226a25a (diff)
downloadsrc-5ecb5444aa349246568dc6f9a615630e29191f7c.tar.gz
src-5ecb5444aa349246568dc6f9a615630e29191f7c.zip
jail: add process linkage
It allows iteration over processes belonging to given jail instead of having to walk the entire allproc list. Note the iteration can miss processes which remains bug-compatible with previous code. Reviewed by: jamie (previous version), markj (previous version) Differential Revision: https://reviews.freebsd.org/D34522
Diffstat (limited to 'sys/kern/kern_exit.c')
-rw-r--r--sys/kern/kern_exit.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index e7a6f8d66c39..3f64343aea0e 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -473,6 +473,7 @@ exit1(struct thread *td, int rval, int signo)
*/
p->p_list.le_prev = NULL;
#endif
+ prison_proc_unlink(p->p_ucred->cr_prison, p);
sx_xunlock(&allproc_lock);
sx_xlock(&proctree_lock);