diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2011-07-08 19:00:10 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2011-07-08 19:00:10 +0000 |
commit | da44dcec3f5d9e39192a59d3cc1618d0467bdc0f (patch) | |
tree | 0df7c69f1611518e6ba4c6382c7cc35e79316503 /sys/kern | |
parent | a0b689910fdedc87d6b343789d90d9519a06ee0f (diff) |
keep the fdplock around copyout in pipe. ok matthew
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/sys_pipe.c | 7 |
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: |