kernel: Add a final p_lock wait loop before kfree'ing the process
authorYONETANI Tomokazu <y0netan1@dragonflybsd.org>
Mon, 6 Jun 2011 05:09:04 +0000 (14:09 +0900)
committerYONETANI Tomokazu <y0netan1@dragonflybsd.org>
Mon, 6 Jun 2011 05:09:04 +0000 (14:09 +0900)
commit49aa3df0ca3e226c0a0d7097863a2426ee6fd534
treedb1b83cf1f23556dea454bdcd926eb44703ae3a5
parentd631ab59a79389f22fffd1a4937eec05405efd1b
kernel: Add a final p_lock wait loop before kfree'ing the process

Since p_lock can be acquired during the process removal, there
needs to be a final wait loop after the proc has been removed
from all queues, just before the kfree(p).  It will be a very
rare case but it definitely can still occur if e.g. the SYSCTL_OUT
code blocks on a VM fault or something like that.

Requested-by: dillon@
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1996>
sys/kern/kern_exit.c