Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7]: src/sys/kern Pull up following revision(s) (requested by chri...
details: https://anonhg.NetBSD.org/src/rev/0d58a99750b6
branches: netbsd-7
changeset: 799681:0d58a99750b6
user: riz <riz%NetBSD.org@localhost>
date: Sun Nov 08 00:55:11 2015 +0000
description:
Pull up following revision(s) (requested by christos in ticket #1018):
sys/kern/uipc_syscalls.c: revision 1.181
Don't overwrite the user iov pointer in sendmmsg. Make the send and receive
code look the same.
diffstat:
sys/kern/uipc_syscalls.c | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diffs (51 lines):
diff -r 14d246ff8781 -r 0d58a99750b6 sys/kern/uipc_syscalls.c
--- a/sys/kern/uipc_syscalls.c Sun Nov 08 00:49:05 2015 +0000
+++ b/sys/kern/uipc_syscalls.c Sun Nov 08 00:55:11 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uipc_syscalls.c,v 1.172.2.1 2015/08/08 15:45:47 martin Exp $ */
+/* $NetBSD: uipc_syscalls.c,v 1.172.2.2 2015/11/08 00:55:11 riz Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls.c,v 1.172.2.1 2015/08/08 15:45:47 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls.c,v 1.172.2.2 2015/11/08 00:55:11 riz Exp $");
#include "opt_pipe.h"
@@ -568,10 +568,10 @@
if (error)
goto bad;
}
- mp->msg_iov = iov;
- }
+ auio.uio_iov = iov;
+ } else
+ auio.uio_iov = mp->msg_iov;
- auio.uio_iov = mp->msg_iov;
auio.uio_iovcnt = mp->msg_iovlen;
auio.uio_rw = UIO_WRITE;
auio.uio_offset = 0; /* XXX */
@@ -579,7 +579,8 @@
KASSERT(l == curlwp);
auio.uio_vmspace = l->l_proc->p_vmspace;
- for (i = 0, tiov = mp->msg_iov; i < mp->msg_iovlen; i++, tiov++) {
+ tiov = auio.uio_iov;
+ for (i = 0; i < auio.uio_iovcnt; i++, tiov++) {
/*
* Writes return ssize_t because -1 is returned on error.
* Therefore, we must restrict the length to SSIZE_MAX to
@@ -955,7 +956,7 @@
auio.uio_vmspace = l->l_proc->p_vmspace;
tiov = auio.uio_iov;
- for (i = 0; i < mp->msg_iovlen; i++, tiov++) {
+ for (i = 0; i < auio.uio_iovcnt; i++, tiov++) {
/*
* Reads return ssize_t because -1 is returned on error.
* Therefore we must restrict the length to SSIZE_MAX to
Home |
Main Index |
Thread Index |
Old Index