From owner-freebsd-stable Mon Aug 12 16:27:11 2002 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5D04137B400 for ; Mon, 12 Aug 2002 16:27:08 -0700 (PDT) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id 4C91143E42 for ; Mon, 12 Aug 2002 16:27:07 -0700 (PDT) (envelope-from iedowse@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 13 Aug 2002 00:27:06 +0100 (BST) To: Brian Buchanan Cc: stable@freebsd.org Subject: Re: Please apply kern/36605 for 4.7 In-Reply-To: Your message of "Mon, 12 Aug 2002 15:47:56 PDT." <20020812154358.Q45704-100000@thought.holo.org> Date: Tue, 13 Aug 2002 00:27:05 +0100 From: Ian Dowse Message-ID: <200208130027.aa97334@salmon.maths.tcd.ie> Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <20020812154358.Q45704-100000@thought.holo.org>, Brian Buchanan writ es: >Would someone mind applying the patch in kern/36605 to stable before the >code freeze? This fixes a panic when running sysctl -a on a machine with >2GB or more of RAM. I originally discovered this on a 4.3 kernel patched >to fix the swap allocation bug, but have received reports of it still >being broken in 4.6 and the patch resolving the problem. Thanks for the reminder. Just looking at the patch, it seems that in the first chunk, the code can be further simplified by unconditionally using zlist as the `next' pointer. I will commit the following shortly: Ian Index: vm_zone.c =================================================================== RCS file: /home/iedowse/CVS/src/sys/vm/Attic/vm_zone.c,v retrieving revision 1.30.2.4 diff -u -r1.30.2.4 vm_zone.c --- vm_zone.c 14 Dec 2001 19:08:55 -0000 1.30.2.4 +++ vm_zone.c 12 Aug 2002 23:17:29 -0000 @@ -145,12 +145,8 @@ z->znalloc = 0; z->zitems = NULL; - if (zlist == 0) { - zlist = z; - } else { - z->znext = zlist; - zlist = z; - } + z->znext = zlist; + zlist = z; } z->zflags |= flags; @@ -165,8 +161,10 @@ zone_kmem_kvaspace += totsize; z->zkva = kmem_alloc_pageable(kernel_map, totsize); - if (z->zkva == 0) + if (z->zkva == 0) { + zlist = z->znext; return 0; + } z->zpagemax = totsize / PAGE_SIZE; if (obj == NULL) { To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message