DragonFly-2.3.0.374.gea59a master sys/kern kern_synch.c

Simon Schubert corecode at crater.dragonflybsd.org
Mon Mar 9 10:13:28 PDT 2009


commit ea59a6970871b4b25090ac678008c87a3b0f35a9
Author: Simon Schubert <corecode at dragonflybsd.org>
Date:   Sat Mar 7 17:54:37 2009 +0100

    stay in tstop() as long as the process is stopped
    
    Under some conditions (mainly related to multi-threaded processes and
    tracing (gdb)), wakeups, scheduling and stops can lead to a race which
    will leave the process stopped and wait()ed, but the P_WAITED flag
    cleared.  This happens because a thread in tstop() might have been woken
    up, but not yet scheduled.  If the process in turn would get stopped
    again (another bug), the thread in tstop() would be counted as stopped,
    but would only be waiting to be scheduled to transition into LSRUN.
    
    Prevent this by checking for SSLEEP in tstop() before returning.

Summary of changes:
 sys/kern/kern_synch.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/ea59a6970871b4b25090ac678008c87a3b0f35a9


-- 
DragonFly BSD source repository





More information about the Commits mailing list