kern/lwp: Check lwp_lock before remove lwp from process lwp tree
commit6214ede12d2e6859d24faacb590244a2d07d3807
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 20 Nov 2015 02:12:57 +0000 (20 10:12 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 20 Nov 2015 02:15:10 +0000 (20 10:15 +0800)
tree62793073d12d634466ff6c39036372020f33530d
parent6242603538ec09603940e1b5c7f5f97922dc1fa1
kern/lwp: Check lwp_lock before remove lwp from process lwp tree

This makes sure that lwp tree iteration with blocking operation
will not be broken.

While I'm here, add assertion lwp_lock == 0 in lwp_dispose()
sys/kern/kern_exit.c
sys/kern/kern_fork.c