Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 May 1995 13:15:36 -0700 (PDT)
From:      Poul-Henning Kamp <phk@ref.tfs.com>
To:        rgrimes@gndrsh.aac.dev.com (Rodney W. Grimes)
Cc:        current@FreeBSD.org
Subject:   Re: please test this patch for panic("swfree")
Message-ID:  <199505172015.NAA26175@ref.tfs.com>
In-Reply-To: <199505172008.NAA12294@gndrsh.aac.dev.com> from "Rodney W. Grimes" at May 17, 95 01:08:43 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> > @@ -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 <phk@login.dknet.dk> -- TRW Financial Systems, Inc.
'All relevant people are pertinent' && 'All rude people are impertinent'
=> 'no rude people are relevant'



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199505172015.NAA26175>