summaryrefslogtreecommitdiffstats
path: root/sys/compat
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2005-07-09 12:34:49 +0000
committerjhb <jhb@FreeBSD.org>2005-07-09 12:34:49 +0000
commitd7eebc79f5c29ccf565dbc72e363390e606a3f48 (patch)
tree83ff280dbecce1f56ef6f61f94ea6b34559ef9d8 /sys/compat
parent8816876fa9909d3428b22db33b1e6fd8edcdd209 (diff)
downloadFreeBSD-src-d7eebc79f5c29ccf565dbc72e363390e606a3f48.zip
FreeBSD-src-d7eebc79f5c29ccf565dbc72e363390e606a3f48.tar.gz
Add Giant around linux_getcwd_common() in linux_getcwd().
Approved by: re (scottl)
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/linux/linux_getcwd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/compat/linux/linux_getcwd.c b/sys/compat/linux/linux_getcwd.c
index 9b810a3..53aae45 100644
--- a/sys/compat/linux/linux_getcwd.c
+++ b/sys/compat/linux/linux_getcwd.c
@@ -465,8 +465,10 @@ linux_getcwd(struct thread *td, struct linux_getcwd_args *args)
* limit it to N/2 vnodes for an N byte buffer.
*/
+ mtx_lock(&Giant);
error = linux_getcwd_common (td->td_proc->p_fd->fd_cdir, NULL,
&bp, path, len/2, GETCWD_CHECK_ACCESS, td);
+ mtx_unlock(&Giant);
if (error)
goto out;
OpenPOWER on IntegriCloud