git: kernel - Fix one-cycle MP race in vshouldmsync()

Matthew Dillon dillon at
Sun Sep 12 10:34:32 PDT 2010

commit aed76ef1f778cc4185ddd699631316d05d6811b6
Author: Matthew Dillon <dillon at>
Date:   Sun Sep 12 10:30:38 2010 -0700

    kernel - Fix one-cycle MP race in vshouldmsync()
    * vshouldmsync() is the mntvnode fast function, which is called without
      any vnode lock.  vp->v_object can thus get ripped out from under the
      scan function.
      Hold vmobj_token through the scan so any pointer accessed via
      v_object remains stable (even if no longer related to the vnode
      due to the race).
    Reported-by: swildner

Summary of changes:
 sys/kern/vfs_mount.c |    7 +++++++
 sys/kern/vfs_subr.c  |   14 ++++++++++----
 2 files changed, 17 insertions(+), 4 deletions(-)

DragonFly BSD source repository

More information about the Commits mailing list