From owner-svn-src-head@FreeBSD.ORG Tue Nov 4 22:30:24 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B347D106564A; Tue, 4 Nov 2008 22:30:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A2B858FC1D; Tue, 4 Nov 2008 22:30:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA4MUOGL009345; Tue, 4 Nov 2008 22:30:24 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA4MUOZC009344; Tue, 4 Nov 2008 22:30:24 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200811042230.mA4MUOZC009344@svn.freebsd.org> From: John Baldwin Date: Tue, 4 Nov 2008 22:30:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184660 - head/sys/security/audit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Nov 2008 22:30:24 -0000 Author: jhb Date: Tue Nov 4 22:30:24 2008 New Revision: 184660 URL: http://svn.freebsd.org/changeset/base/184660 Log: Don't lock the vnode around calls to vn_fullpath(). Reviewed by: csjp, rwatson Modified: head/sys/security/audit/audit_bsm_klib.c Modified: head/sys/security/audit/audit_bsm_klib.c ============================================================================== --- head/sys/security/audit/audit_bsm_klib.c Tue Nov 4 20:57:39 2008 (r184659) +++ head/sys/security/audit/audit_bsm_klib.c Tue Nov 4 22:30:24 2008 (r184660) @@ -492,7 +492,7 @@ audit_canon_path(struct thread *td, char char *rbuf, *fbuf, *copy; struct filedesc *fdp; struct sbuf sbf; - int error, cwir, locked; + int error, cwir; WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "%s: at %s:%d", __func__, __FILE__, __LINE__); @@ -539,17 +539,8 @@ audit_canon_path(struct thread *td, char * in the future. */ if (rvnp != NULL) { - /* - * Although unlikely, it is possible for filesystems to define - * their own VOP_LOCK, so strictly speaking, we need to - * conditionally pickup Giant around calls to vn_lock(9) - */ - locked = VFS_LOCK_GIANT(rvnp->v_mount); - vn_lock(rvnp, LK_EXCLUSIVE | LK_RETRY); - vdrop(rvnp); error = vn_fullpath_global(td, rvnp, &rbuf, &fbuf); - VOP_UNLOCK(rvnp, 0); - VFS_UNLOCK_GIANT(locked); + vdrop(rvnp); if (error) { cpath[0] = '\0'; if (cvnp != NULL) @@ -560,12 +551,8 @@ audit_canon_path(struct thread *td, char free(fbuf, M_TEMP); } if (cvnp != NULL) { - locked = VFS_LOCK_GIANT(cvnp->v_mount); - vn_lock(cvnp, LK_EXCLUSIVE | LK_RETRY); - vdrop(cvnp); error = vn_fullpath(td, cvnp, &rbuf, &fbuf); - VOP_UNLOCK(cvnp, 0); - VFS_UNLOCK_GIANT(locked); + vdrop(cvnp); if (error) { cpath[0] = '\0'; return;