git: vkernel - Fix corrupt tailq (vkernel64 only)

Matthew Dillon dillon at
Tue Jan 4 15:10:32 PST 2011

commit 74c9628e78f2e1c7d9356b41407b394220745b7e
Author: Matthew Dillon <dillon at>
Date:   Tue Jan 4 15:06:59 2011 -0800

    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.

Summary of changes:
 sys/kern/kern_exit.c                       |    2 ++
 sys/kern/kern_synch.c                      |   17 ++++++++++++-----
 sys/kern/lwkt_thread.c                     |    6 ++++--
 sys/platform/vkernel64/x86_64/vm_machdep.c |    2 ++
 4 files changed, 20 insertions(+), 7 deletions(-)

DragonFly BSD source repository

More information about the Commits mailing list