summaryrefslogtreecommitdiffstats
path: root/lib/libutil/imsg-buffer.c
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2015-07-10 11:52:59 +0000
committerkettenis <kettenis@openbsd.org>2015-07-10 11:52:59 +0000
commit2bead5cb479e45c8398ee3e33fe8b3fec5e8d300 (patch)
tree9b7ad2dc0f2b24bd04f40633f5848462340ad305 /lib/libutil/imsg-buffer.c
parentAvoid calling pool_put(9) while holding a mutex here as well to prevent lock (diff)
downloadwireguard-openbsd-2bead5cb479e45c8398ee3e33fe8b3fec5e8d300.tar.xz
wireguard-openbsd-2bead5cb479e45c8398ee3e33fe8b3fec5e8d300.zip
Don't call pool_put(9) while holding a mutex. Instead collect pv entries in
a list and put them back into the pool after releasing the mutex. This prevents a lock ordering problem between the per-pmap mutexes and the kernel lock that arises because pool_put(9) may grab the kernel lock when it decides to free a pool page. This seems to make the i386 pmap mpsafe enough to run the reaper without holding the kernel lock. ok sthen@ (who helped me a lot debugging this)
Diffstat (limited to 'lib/libutil/imsg-buffer.c')
0 files changed, 0 insertions, 0 deletions