From owner-cvs-all@FreeBSD.ORG Thu Apr 17 21:54:08 2008 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BBAE9106564A; Thu, 17 Apr 2008 21:54:08 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id 8EAE98FC1B; Thu, 17 Apr 2008 21:54:08 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 575E846B03; Thu, 17 Apr 2008 17:54:08 -0400 (EDT) Date: Thu, 17 Apr 2008 22:54:08 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Pawel Jakub Dawidek In-Reply-To: <200804171919.m3HJJeRg088523@repoman.freebsd.org> Message-ID: <20080417225220.A94395@fledge.watson.org> References: <200804171919.m3HJJeRg088523@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern kern_linker.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2008 21:54:08 -0000 On Thu, 17 Apr 2008, Pawel Jakub Dawidek wrote: > pjd 2008-04-17 19:19:40 UTC > > FreeBSD src repository > > Modified files: > sys/kern kern_linker.c > Log: > Allow linker_search_symbol_name() to be called with KLD lock held. > The linker_search_symbol_name() function is used by stack_print() > and stack_print() can be called from kernel module unload method. I'm not sure I'm entirely comfortable with this locking change; conditional locking of this type is something we've generally tried to eliminate. If this is for debugging code used in locking sensitive contexts, it is probably preferable to use one of the _ddb variations on the stack(9) routines, which bypass locking. Or, in this case, it simply uses the locks that are already, conveniently, held. Robert N M Watson Computer Laboratory University of Cambridge