From owner-cvs-src@FreeBSD.ORG Fri Apr 18 07:14:14 2008 Return-Path: Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13B171065671; Fri, 18 Apr 2008 07:14:14 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (chello087206046210.chello.pl [87.206.46.210]) by mx1.freebsd.org (Postfix) with ESMTP id 7084C8FC14; Fri, 18 Apr 2008 07:14:12 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 6714645E5C; Fri, 18 Apr 2008 08:50:18 +0200 (CEST) Received: from localhost (pjd.wheel.pl [10.0.1.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id BA8DE45B26; Fri, 18 Apr 2008 08:50:12 +0200 (CEST) Date: Fri, 18 Apr 2008 08:49:57 +0200 From: Pawel Jakub Dawidek To: Robert Watson Message-ID: <20080418064956.GA6029@garage.freebsd.pl> References: <200804171919.m3HJJeRg088523@repoman.freebsd.org> <20080417225220.A94395@fledge.watson.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="zhXaljGHf11kAtnf" Content-Disposition: inline In-Reply-To: <20080417225220.A94395@fledge.watson.org> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 8.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-5.9 required=3.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 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-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Apr 2008 07:14:14 -0000 --zhXaljGHf11kAtnf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 17, 2008 at 10:54:08PM +0100, Robert Watson wrote: >=20 > On Thu, 17 Apr 2008, Pawel Jakub Dawidek wrote: >=20 > >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. >=20 > I'm not sure I'm entirely comfortable with this locking change; condition= al=20 > locking of this type is something we've generally tried to eliminate. If= =20 > this is for debugging code used in locking sensitive contexts, it is=20 > probably preferable to use one of the _ddb variations on the stack(9)=20 > routines, which bypass locking. Or, in this case, it simply uses the loc= ks=20 > that are already, conveniently, held. We would need to change all stack(9) consumers to grab KLD_LOCK() before calling its functions, which I don't find very nice. Currently stack(9) functions are mostly called from contexts where KLD lock is not yet held, but in this case where I want to print leaked objects on module unload, the KLD lock is already held. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --zhXaljGHf11kAtnf Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFICESSForvXbEpPzQRAnVjAKDpQRbLgyczHUKAHeGdgLb1dAabZQCg6d6K AfvqSgjUB1eZzR3D1S5rgrU= =5m/u -----END PGP SIGNATURE----- --zhXaljGHf11kAtnf--