git: kernel - Fix a few MP races against process status

Matthew Dillon dillon at crater.dragonflybsd.org
Sat Mar 5 16:08:45 PST 2011


commit 0d78b86e0a2315042ff35cf013868289cb1c7acf
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Sat Mar 5 16:05:20 2011 -0800

    kernel - Fix a few MP races against process status
    
    * proc->p_token is required when traversing p->p_lwp_tree.
    
    * Reorder lwp insertion on lwp_fork() so scan races see a whole lwp
      instead of a partially initialized one.
    
    * Check for NULL p->p_pgrp and friends when only using proc_token to
      scan the process list to deal with new processes that are still in the
      middle of being fork()'d.
    
    Reported-by: Peter Avalos <peter at theshell.com>,
    	     Antonio Huete Jimenez <tuxillo at crater.dragonflybsd.org>

Summary of changes:
 sys/kern/kern_fork.c  |   25 +++++++++++++------------
 sys/kern/kern_proc.c  |   28 +++++++++++++++++++++-------
 sys/kern/kern_synch.c |   25 ++++++++++++++++---------
 3 files changed, 50 insertions(+), 28 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/0d78b86e0a2315042ff35cf013868289cb1c7acf


-- 
DragonFly BSD source repository





More information about the Commits mailing list