diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2008-11-25 12:07:56 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2008-11-25 12:07:56 +0000 |
commit | 6e975ccd45f058f67d5fc4be2f54b49f1e378170 (patch) | |
tree | e1e4682b752a1c5f12f860549c09e39b31f3eefd /sys/kern/uipc_mbuf.c | |
parent | a1fbe835d47bac06ae8b09ed42b732fd0bd7ebb3 (diff) |
m_cluncount() needs to walk the mbuf chain to correctly uncount all clusters
but don't do that in m_free() as that will cause a double loop behaviour when
called via m_freem().
OK dlg@, deraadt@
Diffstat (limited to 'sys/kern/uipc_mbuf.c')
-rw-r--r-- | sys/kern/uipc_mbuf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c index 42ea4f9674a..66617e66b9c 100644 --- a/sys/kern/uipc_mbuf.c +++ b/sys/kern/uipc_mbuf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_mbuf.c,v 1.98 2008/11/24 19:17:16 dlg Exp $ */ +/* $OpenBSD: uipc_mbuf.c,v 1.99 2008/11/25 12:07:55 claudio Exp $ */ /* $NetBSD: uipc_mbuf.c,v 1.15.4.1 1996/06/13 17:11:44 cgd Exp $ */ /* @@ -323,7 +323,7 @@ m_free(struct mbuf *m) m->m_ext.ext_prevref->m_ext.ext_nextref = m->m_ext.ext_nextref; } else if (m->m_flags & M_CLUSTER) { - m_cluncount(m); + m_cluncount(m, 0); pool_put(&mclpools[m->m_ext.ext_backend], m->m_ext.ext_buf); } else if (m->m_ext.ext_free) |