From f2f2285a6a2c3305d9bb77020e1f76ba4c4f360b Mon Sep 17 00:00:00 2001 From: Ian Dowse Date: Mon, 1 Jul 2002 20:46:01 +0000 Subject: [PATCH] The jail syscall calls chroot, which is not mpsafe, so put back a mtx_lock(&Giant) around that call. Reviewed by: arr --- sys/kern/kern_jail.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index cf3b03c97595..1d7659300a70 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -79,7 +79,9 @@ jail(td, uap) if (error) goto bail; ca.path = j.path; + mtx_lock(&Giant); error = chroot(td, &ca); + mtx_unlock(&Giant); if (error) goto bail; newcred = crget();