diff options
author | Bret Lambert <blambert@cvs.openbsd.org> | 2009-06-03 03:57:21 +0000 |
---|---|---|
committer | Bret Lambert <blambert@cvs.openbsd.org> | 2009-06-03 03:57:21 +0000 |
commit | 5fece5d9ea3de7156a09bba73012d1e66fcc0fa7 (patch) | |
tree | 9774349602153b020652e9aedbe81df6e5bda23e /sys/kern/vfs_syscalls.c | |
parent | d102dfd144ded1d7d74ce190612b4fe78bdaae7a (diff) |
Revert readv/writev changes, as they trigger an apparent file descriptor
deadlock for ckuethe@
"if you have to revert, you have to revert" deraadt@
Diffstat (limited to 'sys/kern/vfs_syscalls.c')
-rw-r--r-- | sys/kern/vfs_syscalls.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index a69d7f9c148..19ff031b110 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_syscalls.c,v 1.153 2009/06/02 03:04:09 blambert Exp $ */ +/* $OpenBSD: vfs_syscalls.c,v 1.154 2009/06/03 03:57:20 blambert Exp $ */ /* $NetBSD: vfs_syscalls.c,v 1.71 1996/04/23 10:29:02 mycroft Exp $ */ /* @@ -2439,7 +2439,6 @@ sys_pread(struct proc *p, void *v, register_t *retval) syscallarg(int) pad; syscallarg(off_t) offset; } */ *uap = v; - struct iovec iov; struct filedesc *fdp = p->p_fd; struct file *fp; struct vnode *vp; @@ -2456,14 +2455,13 @@ sys_pread(struct proc *p, void *v, register_t *retval) return (ESPIPE); } - iov.iov_base = (void *)SCARG(uap, buf); - iov.iov_len = SCARG(uap, nbyte); offset = SCARG(uap, offset); FREF(fp); - /* dofilereadv() will FRELE the descriptor for us */ - return (dofilereadv(p, fd, fp, &iov, 1, &offset, retval)); + /* dofileread() will FRELE the descriptor for us */ + return (dofileread(p, fd, fp, SCARG(uap, buf), SCARG(uap, nbyte), + &offset, retval)); } /* @@ -2517,7 +2515,6 @@ sys_pwrite(struct proc *p, void *v, register_t *retval) syscallarg(int) pad; syscallarg(off_t) offset; } */ *uap = v; - struct iovec iov; struct filedesc *fdp = p->p_fd; struct file *fp; struct vnode *vp; @@ -2536,12 +2533,11 @@ sys_pwrite(struct proc *p, void *v, register_t *retval) FREF(fp); - iov.iov_base = (void *)SCARG(uap, buf); - iov.iov_len = SCARG(uap, nbyte); offset = SCARG(uap, offset); - /* dofilewritev() will FRELE the descriptor for us */ - return (dofilewritev(p, fd, fp, &iov, 1, &offset, retval)); + /* dofilewrite() will FRELE the descriptor for us */ + return (dofilewrite(p, fd, fp, SCARG(uap, buf), SCARG(uap, nbyte), + &offset, retval)); } /* |