From owner-freebsd-current Tue Sep 10 13:27:44 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 97B7837B406; Tue, 10 Sep 2002 13:27:41 -0700 (PDT) Received: from gw.catspoiler.org (217-ip-163.nccn.net [209.79.217.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 634C343E9E; Tue, 10 Sep 2002 13:27:37 -0700 (PDT) (envelope-from dl-freebsd@catspoiler.org) Received: from mousie.catspoiler.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.12.5/8.12.5) with ESMTP id g8AKA3wr095951; Tue, 10 Sep 2002 13:10:07 -0700 (PDT) (envelope-from dl-freebsd@catspoiler.org) Message-Id: <200209102010.g8AKA3wr095951@gw.catspoiler.org> Date: Tue, 10 Sep 2002 13:10:03 -0700 (PDT) From: Don Lewis Subject: Re: vnode lock assertion problem in nfs_link() To: rwatson@FreeBSD.ORG Cc: bde@zeta.org.au, current@FreeBSD.ORG, jeff@FreeBSD.ORG In-Reply-To: MIME-Version: 1.0 Content-Type: TEXT/plain; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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