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/55f7dfbb052b
branches:  netbsd-6
changeset: 774368:55f7dfbb052b
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Jul 30 07:55:58 2012 +0000

description:
Pull up following revision(s) (requested by matt in ticket #452):
        sys/compat/netbsd32/netbsd32_socket.c: revision 1.40
Make SCM_RIGHTS work correctly.  (make sure to advance m if we've completely
dealt with, the next mbuf (if any) comes into play).

diffstat:

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

diffs (36 lines):

diff -r 5dd657777027 -r 55f7dfbb052b sys/compat/netbsd32/netbsd32_socket.c
--- a/sys/compat/netbsd32/netbsd32_socket.c     Sat Jul 28 11:38:22 2012 +0000
+++ b/sys/compat/netbsd32/netbsd32_socket.c     Mon Jul 30 07:55:58 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_socket.c,v 1.39 2012/01/20 14:08:07 joerg Exp $       */
+/*     $NetBSD: netbsd32_socket.c,v 1.39.2.1 2012/07/30 07:55:58 martin 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 2012/01/20 14:08:07 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_socket.c,v 1.39.2.1 2012/07/30 07:55:58 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -138,7 +138,7 @@
 
        q = (char *)mp->msg_control;
 
-       for (m = control; m != NULL; m = m->m_next) {
+       for (m = control; len > 0 && m != NULL; m = m->m_next) {
                error = copyout32_msg_control_mbuf(l, mp, &len, m, &q, &truncated);
                if (truncated) {
                        m = control;
@@ -146,8 +146,6 @@
                }
                if (error)
                        break;
-               if (len <= 0)
-                       break;
        }
 
        free_control_mbuf(l, control, m);



Home | Main Index | Thread Index | Old Index