From owner-p4-projects Sat Sep 7 16:20: 2 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 12DDC37B401; Sat, 7 Sep 2002 16:19:57 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A6F3737B400 for ; Sat, 7 Sep 2002 16:19:56 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 681D343E65 for ; Sat, 7 Sep 2002 16:19:56 -0700 (PDT) (envelope-from mini@freebsd.org) Received: from freefall.freebsd.org (perforce@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g87NJuJU099368 for ; Sat, 7 Sep 2002 16:19:56 -0700 (PDT) (envelope-from mini@freebsd.org) Received: (from perforce@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g87NJum2099365 for perforce@freebsd.org; Sat, 7 Sep 2002 16:19:56 -0700 (PDT) Date: Sat, 7 Sep 2002 16:19:56 -0700 (PDT) Message-Id: <200209072319.g87NJum2099365@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to mini@freebsd.org using -f From: Jonathan Mini Subject: PERFORCE change 17212 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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