Module Name: src Committed By: riz Date: Sat Aug 18 22:01:41 UTC 2012
Modified Files: src/sys/compat/netbsd32 [netbsd-6]: netbsd32_socket.c Log Message: Pull up following revision(s) (requested by martin in ticket #510): sys/compat/netbsd32/netbsd32_socket.c: revision 1.41 Do not use a userland pointer, but the copied-in kernel version instead. While there, reorder loop end condition for efficency. Fixes net/fdpass tests on all archs with separate kernel/userland VA. To generate a diff of this commit: cvs rdiff -u -r1.39.2.1 -r1.39.2.2 src/sys/compat/netbsd32/netbsd32_socket.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/compat/netbsd32/netbsd32_socket.c diff -u src/sys/compat/netbsd32/netbsd32_socket.c:1.39.2.1 src/sys/compat/netbsd32/netbsd32_socket.c:1.39.2.2 --- src/sys/compat/netbsd32/netbsd32_socket.c:1.39.2.1 Mon Jul 30 07:55:58 2012 +++ src/sys/compat/netbsd32/netbsd32_socket.c Sat Aug 18 22:01:40 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_socket.c,v 1.39.2.1 2012/07/30 07:55:58 martin Exp $ */ +/* $NetBSD: netbsd32_socket.c,v 1.39.2.2 2012/08/18 22:01:40 riz Exp $ */ /* * Copyright (c) 1998, 2001 Matthew R. Green @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: netbsd32_socket.c,v 1.39.2.1 2012/07/30 07:55:58 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_socket.c,v 1.39.2.2 2012/08/18 22:01:40 riz Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -296,7 +296,7 @@ copyin32_msg_control(struct lwp *l, stru resid -= CMSG32_ALIGN(cmsg32.cmsg_len); cidx += cmsg->cmsg_len; - } while ((cc = CMSG32_NXTHDR(mp, cc)) && resid > 0); + } while (resid > 0 && (cc = CMSG32_NXTHDR(mp, &cmsg32))); /* If we allocated a buffer, attach to mbuf */ if (cidx > MLEN) {