Date: Fri, 18 Apr 2008 08:49:57 +0200 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: Robert Watson <rwatson@FreeBSD.org> Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern kern_linker.c Message-ID: <20080418064956.GA6029@garage.freebsd.pl> In-Reply-To: <20080417225220.A94395@fledge.watson.org> References: <200804171919.m3HJJeRg088523@repoman.freebsd.org> <20080417225220.A94395@fledge.watson.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080418064956.GA6029>