[prev in list] [next in list] [prev in thread] [next in thread] 

List:       dragonfly-commits
Subject:    git: kernel - Fix improper vgone() in procfs and races in truss
From:       Matthew Dillon <dillon () crater ! dragonflybsd ! org>
Date:       2009-12-29 23:55:45
Message-ID: 200912292355.nBTNtjfn048765 () crater ! dragonflybsd ! org
[Download RAW message or body]


commit e193508c7255b6262b69e52689a301312ad53178
Author: Matthew Dillon <dillon@apollo.backplane.com>
Date:   Tue Dec 29 15:50:39 2009 -0800

    kernel - Fix improper vgone() in procfs and races in truss
    
    * procfs was trying to destroy the vnodes associated with exiting pids,
      ripping them out from under active users.  This is no longer legal.
    
      Instead flag it for the exiting pid so further operations fail.
    
    * procfs's stopevents handling for process tracing was not MPSAFE
      and raced against MPSAFE system call entry points.  This led to
      numerous situations where gdb or truss would get stuck, or where
      the process getting traced would get stuck.
    
      Make the whole mess MPSAFE by protecting the tests against proc->p_spin.
    
    * Note that the platform trap case is optimized to only acquire p_spin
      once it has been determined that a stopevent might be pending.
    
    Reported-by: Antonio Huete Jimenez <tuxillo@quantumachine.net>

Summary of changes:
 sys/kern/sys_process.c        |   37 +++++++++++++++++++++++++++++--------
 sys/vfs/procfs/procfs.h       |    2 ++
 sys/vfs/procfs/procfs_subr.c  |   34 +++++++++++++++++-----------------
 sys/vfs/procfs/procfs_vnops.c |   39 ++++++++++++++++++++++++++++++++++-----
 4 files changed, 82 insertions(+), 30 deletions(-)

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


-- 
DragonFly BSD source repository
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic