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

git: kernel - Fix signal masking race assertion panic w/vkernel


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 31 Mar 2012 18:38:04 -0700 (PDT)

commit 6562e2d87bfc5428fec4426aa343ea315ab88941
Author: Matthew Dillon <dillon@apollo.backplane.com>
Date:   Sat Mar 31 18:30:13 2012 -0700

    kernel - Fix signal masking race assertion panic w/vkernel
    
    * sigsuspend() and pselect() record the old signal mask in order to
      allow an interrupting signal to run its handler before the old mask
      is restored.
    
    * When multiple threads are present a race can ensue where another thread
      changes the signal handler after sigsuspend() or pselect() have interrupted,
      but before they are able to process the signal.
    
    * If the signal is no longer enabled the old signal mask is not restored
      on system call return, resulting in an assertion and panic.
    
    * Fix the problem by checking the flag and restoring the old signal mask
      on return (rather than asserting when the flag is found to be non-zero
      on return).
    
    Reported-by: Venkatesh Srinivas

Summary of changes:
 sys/platform/pc32/i386/trap.c        |   12 +++++++++---
 sys/platform/pc64/x86_64/trap.c      |   12 +++++++++---
 sys/platform/vkernel/i386/trap.c     |   12 +++++++++---
 sys/platform/vkernel64/x86_64/trap.c |   12 +++++++++---
 4 files changed, 36 insertions(+), 12 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/6562e2d87bfc5428fec4426aa343ea315ab88941


-- 
DragonFly BSD source repository



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