summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux/linux_util.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2001-01-27 00:01:31 +0000
committerjhb <jhb@FreeBSD.org>2001-01-27 00:01:31 +0000
commitb6baa60b1e807d09641c20b2ff1fe838ddebbd3b (patch)
tree81781cbbf3ad98f73e64d11188dfe3084b844e12 /sys/compat/linux/linux_util.c
parent0c5b7b7672ac24978496b6d8b72a9f4c74349b64 (diff)
downloadFreeBSD-src-b6baa60b1e807d09641c20b2ff1fe838ddebbd3b.zip
FreeBSD-src-b6baa60b1e807d09641c20b2ff1fe838ddebbd3b.tar.gz
Back out proc locking to protect p_ucred for obtaining additional
references along with the actual obtaining of additional references.
Diffstat (limited to 'sys/compat/linux/linux_util.c')
-rw-r--r--sys/compat/linux/linux_util.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/sys/compat/linux/linux_util.c b/sys/compat/linux/linux_util.c
index f4fe8d7..6399805 100644
--- a/sys/compat/linux/linux_util.c
+++ b/sys/compat/linux/linux_util.c
@@ -62,7 +62,6 @@ linux_emul_find(p, sgp, prefix, path, pbuf, cflag)
struct nameidata ndroot;
struct vattr vat;
struct vattr vatroot;
- struct ucred *uc;
int error;
char *ptr, *buf, *cp;
size_t sz, len;
@@ -141,18 +140,12 @@ linux_emul_find(p, sgp, prefix, path, pbuf, cflag)
return error;
}
- PROC_LOCK(p);
- uc = p->p_ucred;
- crhold(uc);
- PROC_UNLOCK(p);
- if ((error = VOP_GETATTR(nd.ni_vp, &vat, uc, p)) != 0) {
- crfree(uc);
+ if ((error = VOP_GETATTR(nd.ni_vp, &vat, p->p_ucred, p)) != 0) {
goto bad;
}
- error = VOP_GETATTR(ndroot.ni_vp, &vatroot, uc, p);
- crfree(uc);
- if (error != 0) {
+ if ((error = VOP_GETATTR(ndroot.ni_vp, &vatroot, p->p_ucred, p))
+ != 0) {
goto bad;
}
OpenPOWER on IntegriCloud