git: kernel - Fix additional races in lwp_signotify()

Matthew Dillon dillon at
Thu Nov 17 10:47:01 PST 2011

commit 81cd8ede74a6a09d318c1642787a8b8936374786
Author: Matthew Dillon <dillon at>
Date:   Thu Nov 17 10:44:16 2011 -0800

    kernel - Fix additional races in lwp_signotify()
    * lwp_signotify() was improperly scheduling threads whos td_gd is on the
      local cpu without checking the SINTR flags.  This can catch a thread in
      the middle of being transitioned to another cpu and cause havoc.
    * Only schedule the thread if the SINTR flags are set.
    * We can't call setrunnable() from an IPI so adjustments have to be made
      in the remote cpu to set the lp's lwp_stat state before issuing the IPI
      and only do the scheduling of its thread from the IPI function.
    Reported-by: ftigeot

Summary of changes:
 sys/kern/kern_sig.c |   81 ++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 58 insertions(+), 23 deletions(-)

DragonFly BSD source repository

More information about the Commits mailing list