From owner-freebsd-current Sun Jun 9 15:45:15 2002 Delivered-To: freebsd-current@freebsd.org Received: from mail.chesapeake.net (chesapeake.net [205.130.220.14]) by hub.freebsd.org (Postfix) with ESMTP id 2AF1037B405; Sun, 9 Jun 2002 15:45:11 -0700 (PDT) Received: from localhost (jroberson@localhost) by mail.chesapeake.net (8.11.6/8.11.6) with ESMTP id g59Mj6X49748; Sun, 9 Jun 2002 18:45:07 -0400 (EDT) (envelope-from jroberson@chesapeake.net) Date: Sun, 9 Jun 2002 18:45:06 -0400 (EDT) From: Jeff Roberson To: Ian Dowse Cc: jeff@freebsd.org, Subject: Re: Typo in uma_core.c causing panics after uma_zdestroy() In-Reply-To: <200206050224.aa96889@salmon.maths.tcd.ie> Message-ID: <20020609184443.N85064-100000@mail.chesapeake.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 On Wed, 5 Jun 2002, Ian Dowse wrote: > > 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); > > Looks great to me. Commit it? Thanks, Jeff To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message