Fix the false memory modified after free messages some users have been

reporting - in my previous change, I missed the case where a mbuf
from the packet zone was freed back to the mbuf/packet keg, where
it was subsequently put into the mbuf zone and found not to contain
the expected trash.  This change adds the necessary trash_dtor call inside
mb_fini_pack so that everything is correct.

Thanks for Bosko for finding the bug and showing me how secondary zones
work.

Approved by:	re (dwhite)
This commit is contained in:
silby 2005-06-29 08:18:26 +00:00
parent bd7fc02cf0
commit 0edd2a4f6f

View File

@ -336,6 +336,9 @@ mb_fini_pack(void *mem, int size)
uma_zfree_arg(zone_clust, m->m_ext.ext_buf, NULL);
m->m_ext.ext_buf = NULL;
mbstat.m_mclusts += 1; /* XXX */
#ifdef INVARIANTS
trash_dtor(mem, size, NULL);
#endif
}
/*