Date: Wed, 22 Dec 2004 19:05:31 +0100 From: "Poul-Henning Kamp" <phk@phk.freebsd.dk> To: Don Lewis <truckman@freebsd.org> Cc: current@freebsd.org Subject: Re: vnode lock assertion violation in devfs_fixup() Message-ID: <8931.1103738731@critter.freebsd.dk> In-Reply-To: Your message of "Sat, 18 Dec 2004 23:32:28 PST." <200412190732.iBJ7WSHC066183@gw.catspoiler.org>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <200412190732.iBJ7WSHC066183@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@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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8931.1103738731>