diff options
author | arr <arr@FreeBSD.org> | 2002-06-26 00:29:01 +0000 |
---|---|---|
committer | arr <arr@FreeBSD.org> | 2002-06-26 00:29:01 +0000 |
commit | b6fded0fafcf9aca9e1db60dc0d8d9ed9c48393e (patch) | |
tree | 7f82aca5c283e0a2999cbfaf403f689dcbc84158 | |
parent | 03ae273076386996782a5245a8dcd825add235a5 (diff) | |
download | FreeBSD-src-b6fded0fafcf9aca9e1db60dc0d8d9ed9c48393e.zip FreeBSD-src-b6fded0fafcf9aca9e1db60dc0d8d9ed9c48393e.tar.gz |
- Alleviate jail() from having the burden of acquiring Giant by simply
removing. We can do this since we no longer need Giant to safely
execute jail().
Reviewed by: rwatson, jhb
-rw-r--r-- | sys/kern/kern_jail.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index 2cbe24c..cf3b03c 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -72,7 +72,6 @@ jail(td, uap) if (j.version != 0) return (EINVAL); - mtx_lock(&Giant); MALLOC(pr, struct prison *, sizeof *pr , M_PRISON, M_WAITOK | M_ZERO); mtx_init(&pr->pr_mtx, "jail mutex", NULL, MTX_DEF); pr->pr_securelevel = securelevel; @@ -97,14 +96,12 @@ jail(td, uap) pr->pr_ref = 1; PROC_UNLOCK(p); crfree(oldcred); - mtx_unlock(&Giant); return (0); badcred: PROC_UNLOCK(p); crfree(newcred); bail: FREE(pr, M_PRISON); - mtx_unlock(&Giant); return (error); } |