From owner-freebsd-current Thu Apr 11 15:49:42 2002 Delivered-To: freebsd-current@freebsd.org Received: from owa1.digisle.com (ex-owa-sj.digisle.com [165.193.27.217]) by hub.freebsd.org (Postfix) with ESMTP id 7392A37B404; Thu, 11 Apr 2002 15:49:36 -0700 (PDT) Received: from digisle.net ([206.220.227.145] RDNS failed) by owa1.digisle.com over TLS secured channel with Microsoft SMTPSVC(5.0.2195.2966); Thu, 11 Apr 2002 15:49:35 -0700 Message-ID: <3CB612FF.2B05330F@digisle.net> Date: Thu, 11 Apr 2002 15:49:35 -0700 From: Maksim Yevmenkin Organization: Digital Island X-Mailer: Mozilla 4.78 [en] (X11; U; SunOS 5.7 sun4u) X-Accept-Language: en MIME-Version: 1.0 To: Jeffrey Hsu Cc: current@FreeBSD.org, net@FreeBSD.org Subject: Re: Bug in m_split() ? References: <0GUF00L9TDCRFW@mta7.pltn13.pbi.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 11 Apr 2002 22:49:35.0881 (UTC) FILETIME=[2757D790:01C1E1AB] Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hello Jeffrey, > Please try out this patch instead. > > Index: uipc_mbuf.c > =================================================================== > RCS file: /home/cvs/src/sys/kern/uipc_mbuf.c,v > retrieving revision 1.90 > diff -u -6 -r1.90 uipc_mbuf.c > --- uipc_mbuf.c 5 Feb 2002 02:00:53 -0000 1.90 > +++ uipc_mbuf.c 11 Apr 2002 22:31:32 -0000 > @@ -585,14 +585,16 @@ > /* m can't be the lead packet */ > MH_ALIGN(n, 0); > n->m_next = m_split(m, len, wait); > if (n->m_next == NULL) { > (void) m_free(n); > return (NULL); > - } else > + } else { > + n->m_len = 0; > return (n); > + } > } else > MH_ALIGN(n, remain); > } else if (remain == 0) { > n = m->m_next; > m->m_next = NULL; > return (n); it does _exactly_ the same thing as patch i sent. the idea is to set "n->m_len" to zero. in this particular part of the code "n" is not modified. only "n->m_next". so i do not see any difference except your patch is 4 lines :) --- uipc_mbuf.c.orig Mon Apr 8 14:40:23 2002 +++ uipc_mbuf.c Mon Apr 8 14:40:43 2002 @@ -584,6 +584,7 @@ if (remain > MHLEN) { /* m can't be the lead packet */ MH_ALIGN(n, 0); + n->m_len = 0; n->m_next = m_split(m, len, wait); if (n->m_next == NULL) { (void) m_free(n); thanks, max To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message