summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_mbuf.c
diff options
context:
space:
mode:
authorandre <andre@FreeBSD.org>2005-11-04 17:20:53 +0000
committerandre <andre@FreeBSD.org>2005-11-04 17:20:53 +0000
commit438cb7bde701ce0b9a4dffe748bd0f98a9621770 (patch)
tree6fd7fe096545c90fb4216ae8f8172a94f08c19a3 /sys/kern/kern_mbuf.c
parent1aceee70b0e0f10ab5c1556417c9a033f8342137 (diff)
downloadFreeBSD-src-438cb7bde701ce0b9a4dffe748bd0f98a9621770.zip
FreeBSD-src-438cb7bde701ce0b9a4dffe748bd0f98a9621770.tar.gz
Fix a logic error introduced with mandatory mbuf cluster refcounting and
freeing of mbufs+clusters back to the packet zone.
Diffstat (limited to 'sys/kern/kern_mbuf.c')
-rw-r--r--sys/kern/kern_mbuf.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/kern/kern_mbuf.c b/sys/kern/kern_mbuf.c
index e02acca..ffb3e80 100644
--- a/sys/kern/kern_mbuf.c
+++ b/sys/kern/kern_mbuf.c
@@ -395,11 +395,10 @@ mb_ctor_clust(void *mem, int size, void *arg, int how)
static void
mb_dtor_clust(void *mem, int size, void *arg)
{
- u_int *refcnt;
- refcnt = uma_find_refcnt(zone_clust, mem);
- KASSERT(*refcnt == 1, ("%s: refcnt incorrect %u", __func__, *refcnt));
- *refcnt = 0;
+ KASSERT(*(uma_find_refcnt(zone_clust, mem)) <= 1,
+ ("%s: refcnt incorrect %u", __func__,
+ *(uma_find_refcnt(zone_clust, mem))) );
#ifdef INVARIANTS
trash_dtor(mem, size, arg);
#endif
OpenPOWER on IntegriCloud