Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 05 Jun 2002 02:24:28 +0100
From:      Ian Dowse <iedowse@maths.tcd.ie>
To:        jeff@freebsd.org
Cc:        current@freebsd.org
Subject:   Typo in uma_core.c causing panics after uma_zdestroy()
Message-ID:   <200206050224.aa96889@salmon.maths.tcd.ie>

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

The logic for testing UMA_ZFLAG_INTERNAL in zone_dtor() is reversed.
I was able to reliably reproduce crashes with:

	mdconfig -a -t malloc -s 10m
	mdconfig -d -u 0
	mdconfig -a -t malloc -s 10m
	mdconfig -d -u 0

Ian

Index: uma_core.c
===================================================================
RCS file: /FreeBSD/FreeBSD-CVS/src/sys/vm/uma_core.c,v
retrieving revision 1.26
diff -u -r1.26 uma_core.c
--- uma_core.c	3 Jun 2002 22:59:19 -0000	1.26
+++ uma_core.c	5 Jun 2002 01:17:27 -0000
@@ -1132,7 +1132,7 @@
 		printf("Zone %s was not empty.  Lost %d pages of memory.\n",
 		    zone->uz_name, zone->uz_pages);
 
-	if ((zone->uz_flags & UMA_ZFLAG_INTERNAL) != 0)
+	if ((zone->uz_flags & UMA_ZFLAG_INTERNAL) == 0)
 		for (cpu = 0; cpu < maxcpu; cpu++)
 			CPU_LOCK_FINI(zone, cpu);
 

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




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