Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-6]: src/sys/compat/netbsd32 Pull up following revision(s) (reques...



details:   https://anonhg.NetBSD.org/src/rev/7cc68396cca6
branches:  netbsd-6
changeset: 774467:7cc68396cca6
user:      riz <riz%NetBSD.org@localhost>
date:      Sat Aug 18 22:01:40 2012 +0000

description:
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.

diffstat:

 sys/compat/netbsd32/netbsd32_socket.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 95fa8a0f6316 -r 7cc68396cca6 sys/compat/netbsd32/netbsd32_socket.c
--- a/sys/compat/netbsd32/netbsd32_socket.c     Fri Aug 17 23:57:22 2012 +0000
+++ b/sys/compat/netbsd32/netbsd32_socket.c     Sat Aug 18 22:01:40 2012 +0000
@@ -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 @@
 
                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) {



Home | Main Index | Thread Index | Old Index