Date: Mon, 4 Aug 2008 17:16:07 +0300 From: Kostik Belousov <kostikbel@gmail.com> To: John Baldwin <jhb@freebsd.org> Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/kern link_elf.c link_elf_obj.c Message-ID: <20080804141607.GX97161@deviant.kiev.zoral.com.ua> In-Reply-To: <200808040919.08314.jhb@freebsd.org> References: <200808031334.m73DY4fR030018@repoman.freebsd.org> <200808040919.08314.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] On Mon, Aug 04, 2008 at 09:19:07AM -0400, John Baldwin wrote: > On Sunday 03 August 2008 09:33:45 am Konstantin Belousov wrote: > > kib 2008-08-03 13:33:45 UTC > > > > FreeBSD src repository > > > > Modified files: > > sys/kern link_elf.c link_elf_obj.c > > Log: > > SVN rev 181235 on 2008-08-03 13:33:45Z by kib > > > > Calling linker_load_dependencies() while holding the module' > > vnode lock may cause a LOR between kld_sx lock and vnode lock. > > linker_load_dependencies() drops kld_sx, and another thread may attempt > > to load the same kld. > > > > Reported and tested by: pjd > > MFC after: 1 week > > If it is safe to drop the vnode lock here, is there any reason we can't just > drop it earlier and not bother reacquiring it? It is safe because the vnode is referenced by vn_open(), and lock reacquisition is done with LK_RETRY. After the linker_load_dependencies(), optional symbol table loading is performed, that requires reading from the module file. It seems to be a natural location for the operation. [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkiXDyYACgkQC3+MBN1Mb4jGIwCfRcDcOkTzK9rORJNKnexxomx2 X2gAn3gNXC64+C4v/Jv5WIgfsfKBh/H9 =7lQw -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080804141607.GX97161>
