summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2004-09-23 21:01:50 +0000
committerjhb <jhb@FreeBSD.org>2004-09-23 21:01:50 +0000
commit1f2758a712cf09ad71aa9f45144b59dd7af35701 (patch)
tree34e5797bd88bded109ed1e89d23eab0537ae5c09 /sys/kern
parent138096672e74d30398e50cd46f2939bb6cb59518 (diff)
downloadFreeBSD-src-1f2758a712cf09ad71aa9f45144b59dd7af35701.zip
FreeBSD-src-1f2758a712cf09ad71aa9f45144b59dd7af35701.tar.gz
- Don't try to unlock Giant if single threading fails since we don't have
it locked. - Unlock Giant before calling exit1() since exit1() does not require Giant.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_exec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index 1a79f48..77e7bc5 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -257,7 +257,6 @@ kern_execve(td, fname, argv, envv, mac_p)
if (p->p_flag & P_HADTHREADS) {
if (thread_single(SINGLE_EXIT)) {
PROC_UNLOCK(p);
- mtx_unlock(&Giant);
return (ERESTART); /* Try again later. */
}
/*
@@ -723,6 +722,7 @@ exec_fail:
if (interplabel != NULL)
mac_vnode_label_free(interplabel);
#endif
+ mtx_unlock(&Giant);
exit1(td, W_EXITCODE(0, SIGABRT));
/* NOT REACHED */
error = 0;
OpenPOWER on IntegriCloud