From owner-svn-src-stable@FreeBSD.ORG Sat Oct 16 08:43:23 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E64FD106564A; Sat, 16 Oct 2010 08:43:23 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B9C3F8FC16; Sat, 16 Oct 2010 08:43:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9G8hN0L068219; Sat, 16 Oct 2010 08:43:23 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9G8hNhv068216; Sat, 16 Oct 2010 08:43:23 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201010160843.o9G8hNhv068216@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 16 Oct 2010 08:43:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213915 - stable/8/sys/kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Oct 2010 08:43:24 -0000 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; }