diff options
author | jeff <jeff@FreeBSD.org> | 2002-04-08 05:13:48 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2002-04-08 05:13:48 +0000 |
commit | ec6ca61413fc944037bb60b4100010acb06b997b (patch) | |
tree | d5b8a7ddc059a18708e0785efcdd55be903ee568 /sys/vm/uma_core.c | |
parent | 548fecffbc92e98cd0029bc03e0c90d7afe07264 (diff) | |
download | FreeBSD-src-ec6ca61413fc944037bb60b4100010acb06b997b.zip FreeBSD-src-ec6ca61413fc944037bb60b4100010acb06b997b.tar.gz |
Don't release the zone lock until after the dtor has been called. As far as I
can tell this could not have caused any problems yet because UMA is still
called with giant.
Pointy hat to: jeff
Noticed by: jake
Diffstat (limited to 'sys/vm/uma_core.c')
-rw-r--r-- | sys/vm/uma_core.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c index 26ba0db..1bac1a3 100644 --- a/sys/vm/uma_core.c +++ b/sys/vm/uma_core.c @@ -1546,9 +1546,9 @@ zfree_start: KASSERT(bucket->ub_bucket[bucket->ub_ptr] == NULL, ("uma_zfree: Freeing to non free bucket index.")); bucket->ub_bucket[bucket->ub_ptr] = item; - CPU_UNLOCK(zone, cpu); if (zone->uz_dtor) zone->uz_dtor(item, zone->uz_size, udata); + CPU_UNLOCK(zone, cpu); return; } else if (cache->uc_allocbucket) { #ifdef UMA_DEBUG_ALLOC @@ -1699,10 +1699,10 @@ uma_zfree_internal(uma_zone_t zone, void *item, void *udata, int skip) /* Zone statistics */ zone->uz_free++; - ZONE_UNLOCK(zone); - if (!skip && zone->uz_dtor) zone->uz_dtor(item, zone->uz_size, udata); + + ZONE_UNLOCK(zone); } /* See uma.h */ |