git: kernel - Fix namecache race & panic

Matthew Dillon dillon at crater.dragonflybsd.org
Tue Jul 26 15:55:13 PDT 2016


commit f0181d639ee52912b16d8015eb5304001f04a3e2
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Tue Jul 26 13:01:27 2016 -0700

    kernel - Fix namecache race & panic
    
    * Properly lock and re-check the parent association when iterating its
      children, fixing a bug in a code path associated with unmounting
      filesystems.
    
      The code improperly assumed that there could be no races because there
      are were no accessors left.  In fact, under heavy loads, the namecache
      scan in this routine can race against the negative-name-cache management
      code.
    
    * Generally speaking can only happen when lots of mounts and unmounts are
      done under heavy loads (for example, tmpfs mounts during a poudriere or
      synth run).

Summary of changes:
 sys/kern/vfs_cache.c   | 80 +++++++++++++++++++++++++++++++++++++++++---------
 sys/kern/vfs_nlookup.c |  7 +++--
 2 files changed, 71 insertions(+), 16 deletions(-)

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


-- 
DragonFly BSD source repository



More information about the Commits mailing list