From f274e25659a91a7c0c63d9013f251acd8dc2630d Mon Sep 17 00:00:00 2001 From: Gleb Smirnoff Date: Fri, 14 Nov 2014 06:02:29 +0000 Subject: [PATCH] There should not be zero length mbufs in socket buffers. The code comes from r1451, and thus can't be explained. A patch with explicit panic() here survived all tests. Tested by: pho Sponsored by: Nginx, Inc. --- sys/kern/uipc_sockbuf.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/sys/kern/uipc_sockbuf.c b/sys/kern/uipc_sockbuf.c index c74343b8f812..9bd5f789d4cc 100644 --- a/sys/kern/uipc_sockbuf.c +++ b/sys/kern/uipc_sockbuf.c @@ -905,13 +905,6 @@ sbcut_internal(struct sockbuf *sb, int len) mfree = m; m = n; } - while (m && m->m_len == 0) { - sbfree(sb, m); - n = m->m_next; - m->m_next = mfree; - mfree = m; - m = n; - } if (m) { sb->sb_mb = m; m->m_nextpkt = next;