From owner-svn-src-all@FreeBSD.ORG Tue Dec 29 02:35:51 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44D9F1065695; Tue, 29 Dec 2009 02:35:51 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 354C98FC21; Tue, 29 Dec 2009 02:35:51 +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 nBT2Zpio008197; Tue, 29 Dec 2009 02:35:51 GMT (envelope-from jkoshy@svn.freebsd.org) Received: (from jkoshy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBT2ZpBs008195; Tue, 29 Dec 2009 02:35:51 GMT (envelope-from jkoshy@svn.freebsd.org) Message-Id: <200912290235.nBT2ZpBs008195@svn.freebsd.org> From: Joseph Koshy Date: Tue, 29 Dec 2009 02:35:51 +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: r201151 - head/sys/dev/hwpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2009 02:35:51 -0000 Author: jkoshy Date: Tue Dec 29 02:35:50 2009 New Revision: 201151 URL: http://svn.freebsd.org/changeset/base/201151 Log: Use VFS_{LOCK,UNLOCK}_GIANT() around the call to vrele(). Reviewed by: kib Modified: head/sys/dev/hwpmc/hwpmc_mod.c Modified: head/sys/dev/hwpmc/hwpmc_mod.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_mod.c Tue Dec 29 00:02:57 2009 (r201150) +++ head/sys/dev/hwpmc/hwpmc_mod.c Tue Dec 29 02:35:50 2009 (r201151) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -1625,6 +1626,7 @@ pmc_log_kernel_mappings(struct pmc *pm) static void pmc_log_process_mappings(struct pmc_owner *po, struct proc *p) { + int locked; vm_map_t map; struct vnode *vp; struct vmspace *vm; @@ -1733,7 +1735,11 @@ pmc_log_process_mappings(struct pmc_owne freepath = NULL; pmc_getfilename(vp, &fullpath, &freepath); last_vp = vp; + + locked = VFS_LOCK_GIANT(vp->v_mount); vrele(vp); + VFS_UNLOCK_GIANT(locked); + vp = NULL; pmclog_process_map_in(po, p->p_pid, start_addr, fullpath); if (freepath)