From a44a414e11eb552397bf345e7c620da9f43fe4ac Mon Sep 17 00:00:00 2001 From: "Tim J. Robbins" Date: Wed, 19 Feb 2003 10:12:42 +0000 Subject: [PATCH] The "m = m->m_next" that was removed in the revision 1.12 was necessary for the m->m_next != NULL case to avoid looping infinitely when the first mbuf in the chain becomes full. --- sys/kern/subr_mchain.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/subr_mchain.c b/sys/kern/subr_mchain.c index ed231bae874..c998a23c1b4 100644 --- a/sys/kern/subr_mchain.c +++ b/sys/kern/subr_mchain.c @@ -195,7 +195,8 @@ mb_put_mem(struct mbchain *mbp, c_caddr_t source, int size, int type) m = m_getm(m, size, M_TRYWAIT, MT_DATA); if (m == NULL) return ENOBUFS; - } + } else + m = m->m_next; mleft = M_TRAILINGSPACE(m); continue; }