[Bug 194643] New: VFS vnode locking incorrect for non-lockmgr vnodes

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Oct 27 21:39:14 UTC 2014


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194643

            Bug ID: 194643
           Summary: VFS vnode locking incorrect for non-lockmgr vnodes
           Product: Base System
           Version: 11.0-CURRENT
          Hardware: Any
                OS: Any
            Status: Needs Triage
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: freebsd-bugs at FreeBSD.org
          Reporter: conrad.meyer at isilon.com

insmntque and probably other parts of VFS are broken for VFS that do not use
lockmgr.

E.g. insmntque_stddtr enters with the vnode locked exclusive, wipes out the
v_op table, and then calls vput() which uses VOP_ISLOCKED, VOP_LOCK,
VOP_UNLOCK.

For VFS where vop_lock1, vop_unlock, vop_islocked doesn't use lockmgr,
insmntque_stddtr leaks the original lock; then vput tries to upgrade via
dead_vnops. This is pretty bogus. Even for VFS that use lockmgr,
insmntque_stddtr doesn't reset v_vnlock to &v_lock; it should probably do this
(or just let vgone() do it).

Additionally, since vgonel() wipes out v_op with dead_vnops, anything else that
holds a vnode lock over vgone() is bogus. (But, not observably so for lockmgr-
/ v_lock-using VFS.)

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list