From owner-freebsd-current Wed May 17 13:15:47 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id NAA13001 for current-outgoing; Wed, 17 May 1995 13:15:47 -0700 Received: from ref.tfs.com (ref.tfs.com [140.145.254.251]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id NAA12995 for ; Wed, 17 May 1995 13:15:43 -0700 Received: (from phk@localhost) by ref.tfs.com (8.6.8/8.6.6) id NAA26175; Wed, 17 May 1995 13:15:36 -0700 From: Poul-Henning Kamp Message-Id: <199505172015.NAA26175@ref.tfs.com> Subject: Re: please test this patch for panic("swfree") To: rgrimes@gndrsh.aac.dev.com (Rodney W. Grimes) Date: Wed, 17 May 1995 13:15:36 -0700 (PDT) Cc: current@FreeBSD.org In-Reply-To: <199505172008.NAA12294@gndrsh.aac.dev.com> from "Rodney W. Grimes" at May 17, 95 01:08:43 pm Content-Type: text Content-Length: 802 Sender: current-owner@FreeBSD.org Precedence: bulk > > @@ -241,15 +241,11 @@ > > sp->sw_nblks = nblks; > > > > if (nblks * nswdev > nswap) > > - nswap = nblks * nswdev; > > + nswap = (nblks+1) * nswdev; > > Okay! > > > > > for (dvbase = dmmax; dvbase < nblks; dvbase += dmmax) { > > blk = nblks - dvbase; > > > > - if ((vsbase = index * dmmax + dvbase * nswdev) >= nswap) > > - panic("swfree"); > > Not Okay, please correct the calculation to do the right check, not > eliminate the sanify check. > Rod, if you do your math, you will see that this cannot fail. > > - blk = dmmax; > > Should this be another panic condition??? See other email. -- Poul-Henning Kamp -- TRW Financial Systems, Inc. 'All relevant people are pertinent' && 'All rude people are impertinent' => 'no rude people are relevant'