summaryrefslogtreecommitdiffstats
path: root/sys/fs/procfs
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2007-04-15 17:06:09 +0000
committerdes <des@FreeBSD.org>2007-04-15 17:06:09 +0000
commit29fb9c20c7495c66cd3e3e4286f23665f9316d59 (patch)
tree989961af3bf9ffb02125c59be3076be97486b85d /sys/fs/procfs
parent4d29cf6f6024b39330583734b7bdabac45abe791 (diff)
downloadFreeBSD-src-29fb9c20c7495c66cd3e3e4286f23665f9316d59.zip
FreeBSD-src-29fb9c20c7495c66cd3e3e4286f23665f9316d59.tar.gz
Instead of stating GIANT_REQUIRED, just acquire and release Giant where
needed. This does not make a difference now, but will when procfs is marked MPSAFE.
Diffstat (limited to 'sys/fs/procfs')
-rw-r--r--sys/fs/procfs/procfs_map.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/fs/procfs/procfs_map.c b/sys/fs/procfs/procfs_map.c
index b98d207..5e0b800 100644
--- a/sys/fs/procfs/procfs_map.c
+++ b/sys/fs/procfs/procfs_map.c
@@ -91,8 +91,6 @@ procfs_doprocmap(PFS_FILL_ARGS)
int wrap32 = 0;
#endif
- GIANT_REQUIRED;
-
PROC_LOCK(p);
error = p_candebug(td, p);
PROC_UNLOCK(p);
@@ -112,6 +110,9 @@ procfs_doprocmap(PFS_FILL_ARGS)
wrap32 = 1;
}
#endif
+
+ mtx_lock(&Giant);
+
error = 0;
if (map != &curthread->td_proc->p_vmspace->vm_map)
vm_map_lock_read(map);
@@ -213,5 +214,7 @@ procfs_doprocmap(PFS_FILL_ARGS)
if (map != &curthread->td_proc->p_vmspace->vm_map)
vm_map_unlock_read(map);
+ mtx_unlock(&Giant);
+
return (error);
}
OpenPOWER on IntegriCloud