aboutsummaryrefslogtreecommitdiff
path: root/sys/compat/linux/linux_util.c
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2001-01-27 00:01:31 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2001-01-27 00:01:31 +0000
commitba88dfc73375c2729cafdc4c1da0c84e720b4c29 (patch)
tree736b37523fefba09638b90d177dab23b40c2ce3d /sys/compat/linux/linux_util.c
parentf0ae4fa2db4779c0b62db45a8135101e444b31d0 (diff)
Back out proc locking to protect p_ucred for obtaining additional
references along with the actual obtaining of additional references.
Notes
Notes: svn path=/head/; revision=71699
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 f4fe8d7d4925..6399805a3037 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;
}