DragonFly BSD
DragonFly commits List (threaded) for 2012-08
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

git: DragonFly_RELEASE_3_0 kernel - Fix exit races which can lead to a corrupt p_children list


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 20 Aug 2012 21:04:41 -0700 (PDT)

commit 1a3fa08b54907be4aeaaec7a391893d5665c49c8
Author: Matthew Dillon <dillon@apollo.backplane.com>
Date:   Wed Aug 15 18:11:11 2012 -0700

    kernel - Fix exit races which can lead to a corrupt p_children list
    
    * There are a few races when getting multiple tokens where a threaded
      process is wait*()ing for exiting children from multiple threads
      at once.
    
      Fix the problem by serializing the operation on a per-child basis,
      and by using PHOLD/PRELE prior to acquiring the child's p_token.
      Then re-check the conditions before accepting the child.
    
    * There is a small chance this will also reduce or fix VM on-exit races
      in i386, as this bug could result in an already-destroyed process
      being pulled off by the racing wait*().  Maybe 25% chance.

Summary of changes:
 sys/kern/kern_exit.c |   69 ++++++++++++++++++++++++++++++++++++--
 sys/kern/kern_proc.c |   92 ++++++++++++++++++++++++++++++++++++++++++++++---
 sys/sys/proc.h       |    4 ++
 3 files changed, 156 insertions(+), 9 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/1a3fa08b54907be4aeaaec7a391893d5665c49c8


-- 
DragonFly BSD source repository



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]