diff options
| author | Bjoern A. Zeeb <bz@FreeBSD.org> | 2008-11-29 14:32:14 +0000 |
|---|---|---|
| committer | Bjoern A. Zeeb <bz@FreeBSD.org> | 2008-11-29 14:32:14 +0000 |
| commit | 413628a7e3d23a897cd959638d325395e4c9691b (patch) | |
| tree | 2b8f4835032d12a0e61cc40dad151e279cf7a49f /sys/kern/kern_exit.c | |
| parent | f0f4475a13fe3545c10e9b3e8c69679c4abfb1b3 (diff) | |
Notes
Diffstat (limited to 'sys/kern/kern_exit.c')
| -rw-r--r-- | sys/kern/kern_exit.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index 6ebe032bab0a..3b45233f8f06 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include <sys/mutex.h> #include <sys/proc.h> #include <sys/pioctl.h> +#include <sys/jail.h> #include <sys/tty.h> #include <sys/wait.h> #include <sys/vmmeter.h> @@ -453,6 +454,10 @@ exit1(struct thread *td, int rv) p->p_xstat = rv; p->p_xthread = td; + /* In case we are jailed tell the prison that we are gone. */ + if (jailed(p->p_ucred)) + prison_proc_free(p->p_ucred->cr_prison); + #ifdef KDTRACE_HOOKS /* * Tell the DTrace fasttrap provider about the exit if it |
