Date: Sat, 16 Oct 2010 08:43:23 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r213915 - stable/8/sys/kern Message-ID: <201010160843.o9G8hNhv068216@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Sat Oct 16 08:43:23 2010 New Revision: 213915 URL: http://svn.freebsd.org/changeset/base/213915 Log: MFC r213359: Release the vnode lock and close the linker file vnode earlier in the linker_load_file methods. This prevents the LOR between kernel linker sx xlock and vnode lock. Modified: stable/8/sys/kern/link_elf.c stable/8/sys/kern/link_elf_obj.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/link_elf.c ============================================================================== --- stable/8/sys/kern/link_elf.c Sat Oct 16 08:38:12 2010 (r213914) +++ stable/8/sys/kern/link_elf.c Sat Oct 16 08:43:23 2010 (r213915) @@ -967,15 +967,15 @@ nosyms: *result = lf; out: + VOP_UNLOCK(nd.ni_vp, 0); + vn_close(nd.ni_vp, FREAD, td->td_ucred, td); + VFS_UNLOCK_GIANT(vfslocked); if (error && lf) linker_file_unload(lf, LINKER_UNLOAD_FORCE); if (shdr) free(shdr, M_LINKER); if (firstpage) free(firstpage, M_LINKER); - VOP_UNLOCK(nd.ni_vp, 0); - vn_close(nd.ni_vp, FREAD, td->td_ucred, td); - VFS_UNLOCK_GIANT(vfslocked); return error; } Modified: stable/8/sys/kern/link_elf_obj.c ============================================================================== --- stable/8/sys/kern/link_elf_obj.c Sat Oct 16 08:38:12 2010 (r213914) +++ stable/8/sys/kern/link_elf_obj.c Sat Oct 16 08:43:23 2010 (r213915) @@ -885,13 +885,13 @@ link_elf_load_file(linker_class_t cls, c *result = lf; out: + VOP_UNLOCK(nd.ni_vp, 0); + vn_close(nd.ni_vp, FREAD, td->td_ucred, td); + VFS_UNLOCK_GIANT(vfslocked); if (error && lf) linker_file_unload(lf, LINKER_UNLOAD_FORCE); if (hdr) free(hdr, M_LINKER); - VOP_UNLOCK(nd.ni_vp, 0); - vn_close(nd.ni_vp, FREAD, td->td_ucred, td); - VFS_UNLOCK_GIANT(vfslocked); return error; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201010160843.o9G8hNhv068216>