mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-03 09:00:21 +00:00
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:
parent
b97b7bab6b
commit
a7b844d2be
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=147652
@ -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
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user