svn commit: r202012 - stable/8/sys/dev/hwpmc
Fabien Thomas
fabient at FreeBSD.org
Sun Jan 10 16:08:14 UTC 2010
Author: fabient
Date: Sun Jan 10 16:08:14 2010
New Revision: 202012
URL: http://svn.freebsd.org/changeset/base/202012
Log:
MFC 201151:
Use VFS_{LOCK,UNLOCK}_GIANT() around the call to vrele().
Modified:
stable/8/sys/dev/hwpmc/hwpmc_mod.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/dev/hwpmc/hwpmc_mod.c
==============================================================================
--- stable/8/sys/dev/hwpmc/hwpmc_mod.c Sun Jan 10 16:05:05 2010 (r202011)
+++ stable/8/sys/dev/hwpmc/hwpmc_mod.c Sun Jan 10 16:08:14 2010 (r202012)
@@ -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>
@@ -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)
More information about the svn-src-stable
mailing list