summaryrefslogtreecommitdiff
path: root/sys/kern/subr_pool.c
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2002-07-23 15:31:37 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2002-07-23 15:31:37 +0000
commit0e4e6e11f985df9e14c90f7ba2690d6b0e7ae115 (patch)
treed98a284e057fab19c61bf5a6102a8e268f09cef3 /sys/kern/subr_pool.c
parent2bdabd30e7ceebcbfcca83433b2dfcf488c9cc89 (diff)
Fix yet another braino.
Just because the pool allocates from intrsafe memory doesn't mean that the pool has to be protected by splvm. We can have an intrsafe pools at splbio or splsoftnet. pool_page_alloc and pool_page_free must du their own splvm protection.
Diffstat (limited to 'sys/kern/subr_pool.c')
-rw-r--r--sys/kern/subr_pool.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/sys/kern/subr_pool.c b/sys/kern/subr_pool.c
index 03f14303eb8..ca61d080e33 100644
--- a/sys/kern/subr_pool.c
+++ b/sys/kern/subr_pool.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_pool.c,v 1.31 2002/07/23 15:26:48 art Exp $ */
+/* $OpenBSD: subr_pool.c,v 1.32 2002/07/23 15:31:36 art Exp $ */
/* $NetBSD: subr_pool.c,v 1.61 2001/09/26 07:14:56 chs Exp $ */
/*-
@@ -2034,14 +2034,23 @@ void *
pool_page_alloc(struct pool *pp, int flags)
{
boolean_t waitok = (flags & PR_WAITOK) ? TRUE : FALSE;
+ void *ret;
+ int s;
- return ((void *)uvm_km_alloc_poolpage(waitok));
+ s = splvm();
+ ret = (void *)uvm_km_alloc_poolpage(waitok);
+ splx(s);
+ return (ret);
}
void
pool_page_free(struct pool *pp, void *v)
{
+ int s;
+
+ s = splvm();
uvm_km_free_poolpage((vaddr_t)v);
+ splx(s);
}
void *