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.
This commit is contained in:
parent
78c3440e7d
commit
b1f9e8cec9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=168763
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user