Fixed a null pointer panic in spc_free(). swap_pager_putpages()
almost always causes this panic for the curproc != pageproc case. This case apparently doesn't happen in normal operation, but it happens when vm_page_alloc_contig() is called when there is a memory hogging application that hasn't already been paged out. PR: 8632 Reviewed by: info@opensound.com (Dev Mazumdar), dg Broken in: rev.1.89 (1998/02/23)
This commit is contained in:
parent
cbffe59841
commit
04258de351
@ -39,7 +39,7 @@
|
||||
* from: Utah $Hdr: swap_pager.c 1.4 91/04/30$
|
||||
*
|
||||
* @(#)swap_pager.c 8.9 (Berkeley) 3/21/94
|
||||
* $Id: swap_pager.c,v 1.102 1998/10/13 08:24:42 dg Exp $
|
||||
* $Id: swap_pager.c,v 1.103 1998/10/31 15:31:28 peter Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -1535,12 +1535,14 @@ swap_pager_putpages(object, m, count, sync, rtvals)
|
||||
}
|
||||
}
|
||||
|
||||
if (bp->b_rcred != NOCRED)
|
||||
crfree(bp->b_rcred);
|
||||
if (bp->b_wcred != NOCRED)
|
||||
crfree(bp->b_wcred);
|
||||
|
||||
spc_free(spc);
|
||||
if (spc != NULL) {
|
||||
if (bp->b_rcred != NOCRED)
|
||||
crfree(bp->b_rcred);
|
||||
if (bp->b_wcred != NOCRED)
|
||||
crfree(bp->b_wcred);
|
||||
spc_free(spc);
|
||||
} else
|
||||
relpbuf(bp);
|
||||
if (swap_pager_free_pending)
|
||||
swap_pager_sync();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user