vkernel - Fix corrupt tailq (vkernel64 only)
authorMatthew Dillon <dillon@apollo.backplane.com>
Tue, 4 Jan 2011 23:06:59 +0000 (15:06 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Tue, 4 Jan 2011 23:06:59 +0000 (15:06 -0800)
commit74c9628e78f2e1c7d9356b41407b394220745b7e
tree385dd07e5aec22fe4b5d3184415cbfb4ad90d12a
parent2b34db9bc289b439c114fcb322ded23b04c17265
vkernel - Fix corrupt tailq (vkernel64 only)

* Properly remove an exiting thread from any tsleep queue it might be
  enqueued on (due to tsleep_interlock() use cases) prior to exiting.

* Fixes tailq corruption which can occur with threaded programs.

* Fix is only applicable to vkernel64.  All other platforms already
  properly remove the thread.

* Assert that an exiting thread has been removed from any sleep queue
  before freeing it in kern_exit.c to catch any future cases.
sys/kern/kern_exit.c
sys/kern/kern_synch.c
sys/kern/lwkt_thread.c
sys/platform/vkernel64/x86_64/vm_machdep.c