From 5fadbfeac2467429217c6a24da993b60bad4c1c4 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sun, 7 Mar 2004 00:06:32 +0000 Subject: [PATCH] Giant is not required for vm_thread_new_altkstack(). --- sys/kern/kern_fork.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index f516b3bdc246..1c39c424bd7a 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -471,11 +471,8 @@ fork1(td, flags, pages, procp) ke2 = FIRST_KSE_IN_KSEGRP(kg2); /* Allocate and switch to an alternate kstack if specified. */ - if (pages != 0) { - mtx_lock(&Giant); + if (pages != 0) vm_thread_new_altkstack(td2, pages); - mtx_unlock(&Giant); - } mtx_lock(&Giant); /* XXX: for VREF() */ PROC_LOCK(p2);