From 5fece5d9ea3de7156a09bba73012d1e66fcc0fa7 Mon Sep 17 00:00:00 2001 From: Bret Lambert Date: Wed, 3 Jun 2009 03:57:21 +0000 Subject: Revert readv/writev changes, as they trigger an apparent file descriptor deadlock for ckuethe@ "if you have to revert, you have to revert" deraadt@ --- sys/kern/vfs_syscalls.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'sys/kern/vfs_syscalls.c') 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)); } /* -- cgit v1.2.3