git: kernel - Fix lock order reversal in cache_resolve_mp()

Matthew Dillon dillon at crater.dragonflybsd.org
Mon May 30 18:20:02 PDT 2022


commit ba1dbd396d7a228d00e493763ba4d0f0d3512ee3
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Thu May 26 22:34:15 2022 -0700

    kernel - Fix lock order reversal in cache_resolve_mp()
    
    * This function is a helper when path lookups cross mount
      boundaries.
    
    * Locking order between namecache records and vnodes must
      be { ncp, vnode }.
    
    * Fix a lock order reversal in cache_resolve_mp() which
      was doing { vnode, ncp }.  This deadlock is very rare
      because mount points are almost never evicted from the
      namecache.  However, dsynth can trigger this bug due
      to its heavy use of null mounts and high concurrent path
      lookup loads.

Summary of changes:
 sys/kern/vfs_cache.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

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


-- 
DragonFly BSD source repository



More information about the Commits mailing list