From owner-freebsd-current Wed May 17 13:23:36 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id NAA13272 for current-outgoing; Wed, 17 May 1995 13:23:36 -0700 Received: from gndrsh.aac.dev.com (gndrsh.aac.dev.com [198.145.92.241]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id NAA13266 for ; Wed, 17 May 1995 13:23:25 -0700 Received: (from rgrimes@localhost) by gndrsh.aac.dev.com (8.6.11/8.6.9) id NAA12370; Wed, 17 May 1995 13:23:03 -0700 From: "Rodney W. Grimes" Message-Id: <199505172023.NAA12370@gndrsh.aac.dev.com> Subject: Re: please test this patch for panic("swfree") To: phk@ref.tfs.com (Poul-Henning Kamp) Date: Wed, 17 May 1995 13:23:03 -0700 (PDT) Cc: current@FreeBSD.org In-Reply-To: <199505172015.NAA26175@ref.tfs.com> from "Poul-Henning Kamp" at May 17, 95 01:15:36 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 1078 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. It can fail if any of the values for some other off by one error goes out of range! > > > > - blk = dmmax; > > > > Should this be another panic condition??? > > See other email. See other mail, some one is now panicing in the call right after this. ARGHHH!!! This is not the time to have to start in on debugging this type of problem! -- Rod Grimes rgrimes@gndrsh.aac.dev.com Accurate Automation Company Custom computers for FreeBSD