git: kernel - Fix race in VFS_MPLOCK/VFS_MPUNLOCK (affects UFS)

Matthew Dillon dillon at crater.dragonflybsd.org
Thu Nov 21 11:20:49 PST 2019


commit 465e06085cd792b14e8161760732c758c7024a2d
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Thu Nov 21 11:13:43 2019 -0800

    kernel - Fix race in VFS_MPLOCK/VFS_MPUNLOCK (affects UFS)
    
    * In the one case where vop_strategy() uses VFS_MPLOCK/VFS_MPUNLOCK,
      it is actually possible for the vnode to go away after the strategy
      call since no ref or lock is held across the call.
    
    * Refactor the macros generally to cache the mount pointer , so
      VFS_MPUNLOCK() no longer takes an argument.
    
    * Primarily affects UFS
    
    Reported-by: tuxillo

Summary of changes:
 sys/kern/vfs_vfsops.c |  26 ++++----
 sys/kern/vfs_vopops.c | 163 +++++++++++++++++++++++++++++++++-----------------
 sys/sys/mount.h       |  17 +++---
 3 files changed, 131 insertions(+), 75 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/465e06085cd792b14e8161760732c758c7024a2d


-- 
DragonFly BSD source repository


More information about the Commits mailing list