summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2011-07-08 19:00:10 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2011-07-08 19:00:10 +0000
commitda44dcec3f5d9e39192a59d3cc1618d0467bdc0f (patch)
tree0df7c69f1611518e6ba4c6382c7cc35e79316503 /sys/kern
parenta0b689910fdedc87d6b343789d90d9519a06ee0f (diff)
keep the fdplock around copyout in pipe. ok matthew
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/sys_pipe.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c
index ae9961f457d..a3edd7cf7cf 100644
--- a/sys/kern/sys_pipe.c
+++ b/sys/kern/sys_pipe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sys_pipe.c,v 1.60 2011/07/08 05:01:27 matthew Exp $ */
+/* $OpenBSD: sys_pipe.c,v 1.61 2011/07/08 19:00:09 tedu Exp $ */
/*
* Copyright (c) 1996 John S. Dyson
@@ -144,15 +144,12 @@ sys_pipe(struct proc *p, void *v, register_t *retval)
FILE_SET_MATURE(rf);
FILE_SET_MATURE(wf);
- fdpunlock(fdp);
-
error = copyout(fds, SCARG(uap, fdp), sizeof(fds));
if (error != 0) {
- fdplock(fdp);
fdrelease(p, fds[0]);
fdrelease(p, fds[1]);
- fdpunlock(fdp);
}
+ fdpunlock(fdp);
return (error);
free3: