From owner-freebsd-current Thu Apr 5 8:52: 4 2001 Delivered-To: freebsd-current@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id 4399737B449 for ; Thu, 5 Apr 2001 08:52:02 -0700 (PDT) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.9.3/8.9.3) id LAA00666; Thu, 5 Apr 2001 11:51:45 -0400 (EDT) (envelope-from wollman) Date: Thu, 5 Apr 2001 11:51:45 -0400 (EDT) From: Garrett Wollman Message-Id: <200104051551.LAA00666@khavrinen.lcs.mit.edu> To: Richard Todd Cc: current@FreeBSD.ORG Subject: selwakeup() In-Reply-To: References: Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG < said: > If I'm reading this backtrace right, the thread handling the sound > hardware called selwakeup() (frame #19). This called pfind() (frame > #18), which tries to lock allproc. selwakeup() shouldn't need to call pfind(). Because the process table is in type-stable memory, it should be sufficient to keep a reference to the caller's proc structure and check to see whether its pid is the same one as in the selinfo. The locking that selwakeup() already needs to do should be sufficient to avoid a race. (In 4.4BSD, process structures were not type-stable so this technique could not have been used.) -GAWollman To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message