Date: Sun, 10 Jan 2010 16:43:45 +0000 (UTC) From: Fabien Thomas <fabient@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r202016 - stable/7/sys/dev/hwpmc Message-ID: <201001101643.o0AGhjvT081887@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: fabient Date: Sun Jan 10 16:43:45 2010 New Revision: 202016 URL: http://svn.freebsd.org/changeset/base/202016 Log: MFC 201151: Use VFS_{LOCK,UNLOCK}_GIANT() around the call to vrele(). Modified: stable/7/sys/dev/hwpmc/hwpmc_mod.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/hwpmc/hwpmc_mod.c ============================================================================== --- stable/7/sys/dev/hwpmc/hwpmc_mod.c Sun Jan 10 16:40:14 2010 (r202015) +++ stable/7/sys/dev/hwpmc/hwpmc_mod.c Sun Jan 10 16:43:45 2010 (r202016) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include <sys/lock.h> #include <sys/malloc.h> #include <sys/module.h> +#include <sys/mount.h> #include <sys/mutex.h> #include <sys/pmc.h> #include <sys/pmckern.h> @@ -1628,6 +1629,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; @@ -1736,7 +1738,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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001101643.o0AGhjvT081887>