git: devfs - Fix a few more issues

Matthew Dillon dillon at crater.dragonflybsd.org
Sat Mar 17 19:49:32 PDT 2018


commit 62e9e4173da92227fd081dae1cb4bc2a8aaee176
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Sat Mar 17 19:43:01 2018 -0700

    devfs - Fix a few more issues
    
    * Fix a devfs_freep() race.  VOP_RECLAIM generated by unrelated
      system load (such as a 'du' which causes vnodes to recycle quickly)
      can race a node teardown because devfs_freep() temporarily unlocks
      devfs_lock across a vnode op.
    
    * Instead of asserting, use the DEVFS_DESTROYED flag to check
      for the race.  The state will be stable for this particular race
      due to the vnode lock.
    
    Reported-by: multiple

Summary of changes:
 sys/sys/devfs.h             |  5 ++---
 sys/vfs/devfs/devfs_core.c  | 47 +++++++++++++++++++++++++--------------------
 sys/vfs/devfs/devfs_vnops.c |  2 +-
 3 files changed, 29 insertions(+), 25 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/62e9e4173da92227fd081dae1cb4bc2a8aaee176


-- 
DragonFly BSD source repository



More information about the Commits mailing list