Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Sep 2002 16:19:56 -0700 (PDT)
From:      Jonathan Mini <mini@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 17212 for review
Message-ID:  <200209072319.g87NJum2099365@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=17212

Change 17212 by mini@mini_stylus on 2002/09/07 16:19:49

	Hold Giant while we allocate a thread. Jeffr says we needn't
	hold Gian over any UMA operation, but I'm still getting
	'Giant not held' panics when we need to allocate a thread
	here.

Affected files ...

.. //depot/projects/kse/sys/kern/kern_thread.c#106 edit

Differences ...

==== //depot/projects/kse/sys/kern/kern_thread.c#106 (text+ko) ====

@@ -621,8 +621,11 @@
 	/*
 	 * Ensure that we have a spare thread available.
 	 */
-	if (ke->ke_tdspare == NULL)
+	if (ke->ke_tdspare == NULL) {
+		mtx_lock(&Giant);
 		ke->ke_tdspare = thread_alloc();
+		mtx_unlock(&Giant);
+	}
 
 	/*
 	 * Bound threads need no additional work.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200209072319.g87NJum2099365>