Date: Tue, 10 Sep 2002 13:10:03 -0700 (PDT) From: Don Lewis <dl-freebsd@catspoiler.org> To: rwatson@FreeBSD.ORG Cc: bde@zeta.org.au, current@FreeBSD.ORG, jeff@FreeBSD.ORG Subject: Re: vnode lock assertion problem in nfs_link() Message-ID: <200209102010.g8AKA3wr095951@gw.catspoiler.org> In-Reply-To: <Pine.NEB.3.96L.1020910153259.95428D-100000@fledge.watson.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 10 Sep, Robert Watson wrote: > On Tue, 10 Sep 2002, Don Lewis wrote: >> I'm mostly worried about the vnode being recycled as something else >> after the vput() or vrele() call. I think a better approach would be to >> add the assertion checks to vput() and vrele(), which would mean that we >> could remove most of the checks in the syscall code. The only problems >> we would miss would be when we leak vnode references, but reference >> leaks are a problem anyway. I wish there was a good way to add >> assertion checks for detecting the leaks. > > Unfortunately, we can't assert not locked at the end of vput because of > recursive locking of vnodes. I was actually thinking of adding the assertion at the beginning of vput to check that the vnode was locked. I forgot about recursive locking, so doing any checking inside vrele() wouldn't work. > What I would like to see is a check that, when control is returned to > userland, that the thread owns no locks. That sounds neat, though the obvious solution of traversing the vnode list would sure slow things down ... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200209102010.g8AKA3wr095951>