Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Jun 2005 17:08:02 +0000 (GMT)
From:      jkoshy@FreeBSD.ORG (Joseph Koshy)
To:        freebsd-current@freebsd.org
Cc:        jkoshy@FreeBSD.ORG
Subject:   Kldunload panics in uma_zfree()
Message-ID:  <20050610170802.2B5A816A41F@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help


I've been seeing this for a few days on a recent -current:

 # kldload MODULE 	# hwpmc. vkbd, etc.
 # kldunload MODULE

leads to a panic on the lines of:

 "uma: Freed item 0xc1af0260 did not belong to zone mt_zone\n"

The enclosed patch appears to fix the panic.  Could someone
review?

Index: kern_malloc.c
===================================================================
RCS file: /cvs/FreeBSD/src/sys/kern/kern_malloc.c,v
retrieving revision 1.140
diff -u -r1.140 kern_malloc.c
--- kern_malloc.c	29 May 2005 13:38:07 -0000	1.140
+++ kern_malloc.c	10 Jun 2005 16:45:51 -0000
@@ -616,7 +616,7 @@
 	} else
 		kmemstatistics = mtp->ks_next;
 	mtx_unlock(&malloc_mtx);
-	uma_zfree(mt_zone, mtp);
+	uma_zfree(mt_zone, mtip);
 }
 
 static int

Regards,
Koshy
<jkoshy@freebsd.org>




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050610170802.2B5A816A41F>