Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 May 1995 12:33:15 -0700 (PDT)
From:      Steven G Kargl  <kargl@troutmask.apl.washington.edu>
To:        freebsd-current@freefall.cdrom.com (FreeBSD Current)
Cc:        phk@ref.tfs.com
Subject:   RE: panic: swfree
Message-ID:  <199505171933.MAA00176@troutmask.apl.washington.edu>

next in thread | raw e-mail | index | archive | help
>A typical "one off" error.  Please test this patch.
>
>(David, Rod & John please review.)

>Poul-Henning

>Index: vm_swap.c
>===================================================================
>RCS file: /home/ncvs/src/sys/vm/vm_swap.c,v
>retrieving revision 1.17
>diff -u -r1.17 vm_swap.c
>--- 1.17	1995/05/14 03:00:10
>+++ vm_swap.c	1995/05/17 18:08:26
>@@ -241,15 +241,11 @@
> 	sp->sw_nblks = nblks;
> 
> 	if (nblks * nswdev > nswap)
>-		nswap = nblks * nswdev;
>+		nswap = (nblks+1) * nswdev;
> 
> 	for (dvbase = dmmax; dvbase < nblks; dvbase += dmmax) {
> 		blk = nblks - dvbase;
> 
>-		if ((vsbase = index * dmmax + dvbase * nswdev) >= nswap)
>-			panic("swfree");
>-		if (blk > dmmax)
>-			blk = dmmax;
> 		/* XXX -- we need to exclude the first cluster as above */
> 		/* but for now, this will work fine... */
> 		rlist_free(&swaplist, vsbase, vsbase + blk - 1);
>



This patch gets rid of the swfree panic, but introduced a new one:

panic: rlist_free: free start overlaps already freed area at list tail


-- 
Steven G. Kargl     | Phone: 206-685-4677 |
Applied Physics Lab | Fax:   206-543-6785 |
Univ. of Washington |---------------------|
1013 NE 40th St     | FreeBSD 2.1-current |
Seattle, WA 98105   |---------------------|



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