Re: [patch-2.3.29] bugfix for pipe(2) system call.

David Howells (David.Howells@nexor.co.uk)
Thu, 25 Nov 1999 17:27:10 GMT


> what do you mean? You mean like this:
> ...

Not exactly... I was thinking more in terms of:

asmlinkage int sys_pipe(unsigned long * fildes)
{
int fd[2];
int error;

if (copy_from_user(fildes, fd, 2*sizeof(int)) ||
copy_to_user(fildes, fd, 2*sizeof(int))
)
return -EFAULT;

lock_kernel();
error = do_pipe(fd);
unlock_kernel();
if (!error) {
if (copy_to_user(fildes, fd, 2*sizeof(int)))
error = -EFAULT;
}
return error;
}

David

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/