diff options
author | 2011-11-23 02:05:17 +0000 | |
---|---|---|
committer | 2011-11-23 02:05:17 +0000 | |
commit | c8f535b7fd1d8deae2cdc613c57b08b7c0a1a326 (patch) | |
tree | 3345857d030dea5cb81a62becc8cd02f2402fa28 /sys | |
parent | Move struct proc's sigaltstack struct from the zeroed area into the (diff) | |
download | wireguard-openbsd-c8f535b7fd1d8deae2cdc613c57b08b7c0a1a326.tar.xz wireguard-openbsd-c8f535b7fd1d8deae2cdc613c57b08b7c0a1a326.zip |
block interrupts while pool_reclaim_all is grubbing around in every pools
internals. this fixes a panic i got where a network interrupt tried to use
the mbuf pools mutex while pool_reclaim_all already held it which lead
to the same cpu trying to lock that mutex twice.
ok deraadt@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/subr_pool.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/kern/subr_pool.c b/sys/kern/subr_pool.c index 4c667f5ef4f..5749b5ff9a0 100644 --- a/sys/kern/subr_pool.c +++ b/sys/kern/subr_pool.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_pool.c,v 1.110 2011/09/23 10:08:31 dlg Exp $ */ +/* $OpenBSD: subr_pool.c,v 1.111 2011/11/23 02:05:17 dlg Exp $ */ /* $NetBSD: subr_pool.c,v 1.61 2001/09/26 07:14:56 chs Exp $ */ /*- @@ -1103,8 +1103,12 @@ void pool_reclaim_all(void) { struct pool *pp; + int s; + + s = splhigh(); TAILQ_FOREACH(pp, &pool_head, pr_poollist) pool_reclaim(pp); + splx(s); } #ifdef DDB |