Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Add a KASSERT; we expect *from to be a single mbuf ...



details:   https://anonhg.NetBSD.org/src/rev/5a529f9a1d1c
branches:  trunk
changeset: 829783:5a529f9a1d1c
user:      maxv <maxv%NetBSD.org@localhost>
date:      Mon Feb 12 16:01:35 2018 +0000

description:
Add a KASSERT; we expect *from to be a single mbuf (not chained).

diffstat:

 sys/kern/uipc_syscalls.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r d2a3865f7b27 -r 5a529f9a1d1c sys/kern/uipc_syscalls.c
--- a/sys/kern/uipc_syscalls.c  Mon Feb 12 15:38:14 2018 +0000
+++ b/sys/kern/uipc_syscalls.c  Mon Feb 12 16:01:35 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uipc_syscalls.c,v 1.190 2018/01/04 01:42:25 christos Exp $     */
+/*     $NetBSD: uipc_syscalls.c,v 1.191 2018/02/12 16:01:35 maxv 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.190 2018/01/04 01:42:25 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls.c,v 1.191 2018/02/12 16:01:35 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_pipe.h"
@@ -989,6 +989,7 @@
        mp->msg_flags &= MSG_USERFLAGS;
        error = (*so->so_receive)(so, from, &auio, NULL, control,
            &mp->msg_flags);
+       KASSERT(*from == NULL || (*from)->m_next == NULL);
        len -= auio.uio_resid;
        *retsize = len;
        if (error != 0 && len != 0



Home | Main Index | Thread Index | Old Index