vnode lock assertion violation in devfs_fixup()
Poul-Henning Kamp
phk at phk.freebsd.dk
Wed Dec 22 10:05:34 PST 2004
In message <200412190732.iBJ7WSHC066183 at gw.catspoiler.org>, Don Lewis writes:
>The vput() call is actually in devfs_fixup():
>
> mp->mnt_vnodecovered = vp;
> vp->v_mountedhere = mp;
> mtx_lock(&mountlist_mtx);
> TAILQ_INSERT_TAIL(&mountlist, mp, mnt_list);
> mtx_unlock(&mountlist_mtx);
> VOP_UNLOCK(vp, 0, td);
> vfs_unbusy(mp, td);
> VREF(vp);
>---> vput(vp);
> vput(dvp);
>
>vput() is supposed to be called with the vnode lock held and it releases
>the lock, which won't work too well because the vnode was just unlocked
>3 lines earlier. vput() also decrements the vnode reference count, but
>why are we incrementing the reference count on the line above? I
>suspect that the VREF()/vput() sequence should just go away.
That sounds like the most likely fix :-)
I just tried to faithfully emulate the previous code in all respects
and never got around to fix this up.
If you can confirm that just removing VREF+vput works, then by all
means commit it.
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
More information about the freebsd-current
mailing list