git: tmpfs - Close rare vnode recycle race

Matthew Dillon dillon at crater.dragonflybsd.org
Sat Sep 14 07:38:17 PDT 2019


commit 89984f3d2cfccbd968e1d909a7941d20cf370f5d
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Sat Sep 14 07:35:51 2019 -0700

    tmpfs - Close rare vnode recycle race
    
    * Keep the node lock held when clearing tn_vnode in tmpfs_reclaim()
      to protect against a use-after-free race on tn_vnode against another
      thread.
    
    * Keep the node locked across the node type check and vnode
      ref in tmpfs_unmount() to protect against asynchronous
      reclamation races.

Summary of changes:
 sys/vfs/tmpfs/tmpfs.h        |  1 -
 sys/vfs/tmpfs/tmpfs_subr.c   | 20 --------------------
 sys/vfs/tmpfs/tmpfs_vfsops.c |  4 ++--
 sys/vfs/tmpfs/tmpfs_vnops.c  |  6 ++++--
 4 files changed, 6 insertions(+), 25 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/89984f3d2cfccbd968e1d909a7941d20cf370f5d


-- 
DragonFly BSD source repository


More information about the Commits mailing list