git: kernel - Fix rare vref() assertion

Matthew Dillon dillon at crater.dragonflybsd.org
Sat Dec 8 14:38:44 PST 2018


commit 74272eaf4d2c0a0f58092e8f8035e66d1e0c3ce4
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Sat Dec 8 14:34:51 2018 -0800

    kernel - Fix rare vref() assertion
    
    * The VREF_TERMINATE flag gets cleared when a vnode is reactivated.
      However, concurrent LK_SHARED locks on vnodes can race the v_state
      test.  Thus the code cannot assume that VREF_TERMINATE has been cleared
      when v_state is VS_ACTIVE.
    
      To avoid the race, we simply unconditionally clear VREF_TERMINATE on
      a successful vget().
    
    * Could be reproduced by running blogbench and synth together, both of
      which generate extreme filesystem-intensive loads.

Summary of changes:
 sys/kern/vfs_lock.c | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/74272eaf4d2c0a0f58092e8f8035e66d1e0c3ce4


-- 
DragonFly BSD source repository



More information about the Commits mailing list