From owner-svn-src-stable-7@FreeBSD.ORG Fri Mar 20 00:55:38 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9427106566C; Fri, 20 Mar 2009 00:55:38 +0000 (UTC) (envelope-from csjp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BB8F78FC1D; Fri, 20 Mar 2009 00:55:38 +0000 (UTC) (envelope-from csjp@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 n2K0tc0f081443; Fri, 20 Mar 2009 00:55:38 GMT (envelope-from csjp@svn.freebsd.org) Received: (from csjp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n2K0tcb2081442; Fri, 20 Mar 2009 00:55:38 GMT (envelope-from csjp@svn.freebsd.org) Message-Id: <200903200055.n2K0tcb2081442@svn.freebsd.org> From: "Christian S.J. Peron" Date: Fri, 20 Mar 2009 00:55:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r190120 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb security/audit X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Mar 2009 00:55:39 -0000 Author: csjp Date: Fri Mar 20 00:55:38 2009 New Revision: 190120 URL: http://svn.freebsd.org/changeset/base/190120 Log: MFC r184660 - Dont hold Giant around vn_fullpath and vn_fullpath_global Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/security/audit/audit_bsm_klib.c Modified: stable/7/sys/security/audit/audit_bsm_klib.c ============================================================================== --- stable/7/sys/security/audit/audit_bsm_klib.c Fri Mar 20 00:38:14 2009 (r190119) +++ stable/7/sys/security/audit/audit_bsm_klib.c Fri Mar 20 00:55:38 2009 (r190120) @@ -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, td); - vdrop(rvnp); error = vn_fullpath_global(td, rvnp, &rbuf, &fbuf); - VOP_UNLOCK(rvnp, 0, td); - 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, td); - vdrop(cvnp); error = vn_fullpath(td, cvnp, &rbuf, &fbuf); - VOP_UNLOCK(cvnp, 0, td); - VFS_UNLOCK_GIANT(locked); + vdrop(cvnp); if (error) { cpath[0] = '\0'; return;