From owner-freebsd-current Tue Jun 4 18:24:34 2002 Delivered-To: freebsd-current@freebsd.org Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by hub.freebsd.org (Postfix) with SMTP id BB92037B407; Tue, 4 Jun 2002 18:24:29 -0700 (PDT) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 5 Jun 2002 02:24:28 +0100 (BST) To: jeff@freebsd.org Cc: current@freebsd.org Subject: Typo in uma_core.c causing panics after uma_zdestroy() Date: Wed, 05 Jun 2002 02:24:28 +0100 From: Ian Dowse Message-ID: <200206050224.aa96889@salmon.maths.tcd.ie> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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