--- src/sys/kern/kern_slaballoc.c 2007/06/07 20:34:14 1.50 +++ src/sys/kern/kern_slaballoc.c 2007/11/18 09:53:19 1.51 @@ -293,6 +293,11 @@ malloc_uninit(void *data) if (type->ks_limit == 0) panic("malloc_uninit on uninitialized type"); +#ifdef SMP + /* Make sure that all pending kfree()s are finished. */ + lwkt_synchronize_ipiqs("muninit"); +#endif + #ifdef INVARIANTS /* * memuse is only correct in aggregation. Due to memory being allocated