Subject: m_copyback0 wrong ?
To: None <tech-net@netbsd.org>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: tech-net
Date: 01/23/2006 12:51:36
hi,
mishka@ reported a panic in m_makewritable() because of a DEBUG check:
error = m_copyback0(mp, off, len, NULL,
M_COPYBACK0_PRESERVE|M_COPYBACK0_COW, how);
#if defined(DEBUG)
reslen = 0;
for (n = *mp; n; n = n->m_next)
reslen += n->m_len;
if (origlen != reslen)
panic("m_makewritable: length changed");
if (((*mp)->m_flags & M_PKTHDR) != 0 && reslen != (*mp)->m_pkthdr.len)
panic("m_makewritable: inconsist");
#endif /* defined(DEBUG) */
This would mean m_copyback0() modified the mbuf chain but was unable
to complete the job. From the mbuf manual page, m_makewritable()
should return the original mbuf chain in case of error, so m_copyback0()
should too ...
Now a quick look at m_copyback0() didn't show me where the problem is ...
--
Manuel Bouyer <bouyer@antioche.eu.org>
NetBSD: 26 ans d'experience feront toujours la difference
--