diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2006-03-17 04:15:52 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2006-03-17 04:15:52 +0000 |
commit | d766c542969ad80916e41a5110f08ba122d811c0 (patch) | |
tree | c5a130651280e122449839e5eb48e24796879e6f /sys/kern | |
parent | a127a85467532e9a62e1e5be032db5eb766450d0 (diff) |
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.
From martin NetBSD
ok claudio@ mcbride@
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/uipc_mbuf2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/uipc_mbuf2.c b/sys/kern/uipc_mbuf2.c index ce757a5d8c1..ae71cda90d8 100644 --- a/sys/kern/uipc_mbuf2.c +++ b/sys/kern/uipc_mbuf2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_mbuf2.c,v 1.23 2006/01/05 05:05:06 jsg Exp $ */ +/* $OpenBSD: uipc_mbuf2.c,v 1.24 2006/03/17 04:15:51 brad Exp $ */ /* $KAME: uipc_mbuf2.c,v 1.29 2001/02/14 13:42:10 itojun Exp $ */ /* $NetBSD: uipc_mbuf.c,v 1.40 1999/04/01 00:23:25 thorpej Exp $ */ @@ -176,7 +176,7 @@ m_pulldown(struct mbuf *m, int off, int len, int *offp) 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; bcopy(mtod(n, caddr_t) + off, mtod(n->m_next, caddr_t), hlen); |