From 0014b343e0e996b1410bb850c2af25e2850bc219 Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Sun, 11 Jul 2004 01:44:12 +0000 Subject: [PATCH] In the 'dontblock' section of soreceive(), assert that the mbuf on hand ('m') is in fact the first mbuf in the receive socket buffer. --- sys/kern/uipc_socket.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index cb6ba3a315b9..35355d3a00ae 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1010,6 +1010,7 @@ dontblock: SOCKBUF_LOCK_ASSERT(&so->so_rcv); if (uio->uio_td) uio->uio_td->td_proc->p_stats->p_ru.ru_msgrcv++; + KASSERT(m == so->so_rcv.sb_mb, ("soreceive: m != so->so_rcv.sb_mb")); SBLASTRECORDCHK(&so->so_rcv); SBLASTMBUFCHK(&so->so_rcv); nextrecord = m->m_nextpkt;