summaryrefslogtreecommitdiffstats
path: root/sys/vm/swap_pager.c
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>2000-03-27 21:33:32 +0000
committerdillon <dillon@FreeBSD.org>2000-03-27 21:33:32 +0000
commit5ccef75e02afa360480c05b8d01bdd8f2abc39bc (patch)
treef01da80154cdb9843c291ec59e59ba669f6c6d9a /sys/vm/swap_pager.c
parent8fb4c6b599d7fa91e11e38647e849dbac3dabf29 (diff)
downloadFreeBSD-src-5ccef75e02afa360480c05b8d01bdd8f2abc39bc.zip
FreeBSD-src-5ccef75e02afa360480c05b8d01bdd8f2abc39bc.tar.gz
Add necessary spl protection for swapper. The problem was located by
Alfred while testing his SPLASSERT stuff. This is not a complete fix, more protections are probably needed.
Diffstat (limited to 'sys/vm/swap_pager.c')
-rw-r--r--sys/vm/swap_pager.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c
index ca7a3fe..683eb9d 100644
--- a/sys/vm/swap_pager.c
+++ b/sys/vm/swap_pager.c
@@ -702,8 +702,6 @@ swap_pager_copy(srcobject, dstobject, offset, destroysource)
* distance. We do not try to restrict it to the swap device stripe
* (that is handled in getpages/putpages). It probably isn't worth
* doing here.
- *
- * This routine must be called at splvm().
*/
boolean_t
@@ -714,14 +712,17 @@ swap_pager_haspage(object, pindex, before, after)
int *after;
{
daddr_t blk0;
+ int s;
/*
* do we have good backing store at the requested index ?
*/
+ s = splvm();
blk0 = swp_pager_meta_ctl(object, pindex, 0);
if (blk0 == SWAPBLK_NONE) {
+ splx(s);
if (before)
*before = 0;
if (after)
@@ -764,7 +765,7 @@ swap_pager_haspage(object, pindex, before, after)
}
*after = (i - 1);
}
-
+ splx(s);
return (TRUE);
}
OpenPOWER on IntegriCloud