Source-Changes-HG archive

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

[src/trunk]: src/sys/kern In m_pulldown avoid a prepend to the next mbuf in t...



details:   https://anonhg.NetBSD.org/src/rev/7422f3b3fc53
branches:  trunk
changeset: 580724:7422f3b3fc53
user:      martin <martin%NetBSD.org@localhost>
date:      Fri May 06 09:40:40 2005 +0000

description:
In m_pulldown avoid a prepend to the next mbuf in the chain if the result
would still not have all data we want continous.
Fixes PR kern/30098.

diffstat:

 sys/kern/uipc_mbuf2.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 02da671c54bf -r 7422f3b3fc53 sys/kern/uipc_mbuf2.c
--- a/sys/kern/uipc_mbuf2.c     Fri May 06 08:41:00 2005 +0000
+++ b/sys/kern/uipc_mbuf2.c     Fri May 06 09:40:40 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uipc_mbuf2.c,v 1.18 2005/02/26 21:34:55 perry Exp $    */
+/*     $NetBSD: uipc_mbuf2.c,v 1.19 2005/05/06 09:40:40 martin Exp $   */
 /*     $KAME: uipc_mbuf2.c,v 1.29 2001/02/14 13:42:10 itojun Exp $     */
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf2.c,v 1.18 2005/02/26 21:34:55 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf2.c,v 1.19 2005/05/06 09:40:40 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -178,7 +178,7 @@
                goto ok;
        }
        if ((off == 0 || offp) && M_LEADINGSPACE(n->m_next) >= hlen &&
-           !sharedcluster) {
+           !sharedcluster && n->m_next->m_len >= tlen) {
                n->m_next->m_data -= hlen;
                n->m_next->m_len += hlen;
                memcpy(mtod(n->m_next, caddr_t), mtod(n, caddr_t) + off, hlen);



Home | Main Index | Thread Index | Old Index