PERFORCE change 101569 for review
John Baldwin
jhb at FreeBSD.org
Fri Jul 14 16:11:45 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=101569
Change 101569 by jhb at jhb_mutex on 2006/07/14 16:11:31
Add conditional VFS Giant locking to svr4_sys_resolvepath() and mark
MPSAFE.
Affected files ...
.. //depot/projects/smpng/sys/compat/svr4/svr4_misc.c#52 edit
.. //depot/projects/smpng/sys/compat/svr4/syscalls.master#19 edit
.. //depot/projects/smpng/sys/notes#81 edit
Differences ...
==== //depot/projects/smpng/sys/compat/svr4/svr4_misc.c#52 (text+ko) ====
@@ -1601,12 +1601,14 @@
struct nameidata nd;
int error, *retval = td->td_retval;
unsigned int ncopy;
+ int vfslocked;
- NDINIT(&nd, LOOKUP, NOFOLLOW | SAVENAME, UIO_USERSPACE,
+ NDINIT(&nd, LOOKUP, NOFOLLOW | SAVENAME | MPSAFE, UIO_USERSPACE,
uap->path, td);
if ((error = namei(&nd)) != 0)
return error;
+ vfslocked = NDHASGIANT(&nd);
ncopy = min(uap->bufsiz, strlen(nd.ni_cnd.cn_pnbuf) + 1);
if ((error = copyout(nd.ni_cnd.cn_pnbuf, uap->buf, ncopy)) != 0)
@@ -1616,5 +1618,6 @@
bad:
NDFREE(&nd, NDF_ONLY_PNBUF);
vput(nd.ni_vp);
+ VFS_UNLOCK_GIANT(vfslocked);
return error;
}
==== //depot/projects/smpng/sys/compat/svr4/syscalls.master#19 (text+ko) ====
@@ -320,7 +320,7 @@
206 AUE_NULL UNIMPL schedctl
207 AUE_NULL UNIMPL pset
208 AUE_NULL UNIMPL whoknows
-209 AUE_NULL STD { int svr4_sys_resolvepath(const char *path, \
+209 AUE_NULL MSTD { int svr4_sys_resolvepath(const char *path, \
char *buf, size_t bufsiz); }
210 AUE_NULL UNIMPL signotifywait
211 AUE_NULL UNIMPL lwp_sigredirect
==== //depot/projects/smpng/sys/notes#81 (text+ko) ====
@@ -88,8 +88,8 @@
- svr4_sys_getmsg()
- svr4_sys_putmsg()
- svr4_sys_waitsys()
- - svr4_sys_fchroot()
- - svr4_sys_resolvepath()
+ + svr4_sys_fchroot()
+ + svr4_sys_resolvepath()
+ linux
+ linux_uselib()
+ ibcs2
More information about the p4-projects
mailing list