git: kernel - Fix rare tsleep/callout race

Matthew Dillon dillon at
Fri Jul 29 10:23:53 PDT 2016

commit a739e4f85f5a01de1f9f1b414af033798a981373
Author: Matthew Dillon <dillon at>
Date:   Fri Jul 29 10:02:50 2016 -0700

    kernel - Fix rare tsleep/callout race
    * Fix a rare tsleep/callout race.  The callout timer can trigger before
      the tsleep() releases its lwp_token (or if someone else holds the
      calling thread's lwp_token).
      This case is detected, but failed to adjust lwp_stat before
      descheduling and switching away.  This resulted in an endless sleep.

Summary of changes:
 sys/kern/kern_synch.c | 3 +++
 1 file changed, 3 insertions(+)

DragonFly BSD source repository

More information about the Commits mailing list