Date: Fri, 04 Apr 1997 18:27:18 +0200 From: Tor Egge <Tor.Egge@idi.ntnu.no> To: dfr@nlsystems.com Cc: dg@root.com, ponds!rivers@dg-rtp.dg.com, freebsd-hackers@FreeBSD.ORG Subject: Re: kern/3184: vnodes are used after they are freed. (dup alloc?) Message-ID: <199704041627.SAA07632@pat.idt.unit.no> In-Reply-To: Your message of "Fri, 4 Apr 1997 16:43:08 %2B0100 (BST)" References: <Pine.BSF.3.95q.970404163654.8538B-100000@herring.nlsystems.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> I tried testing your fix this morning and the 0xdeadb stuff just caused > vget to fault a couple of minutes into my test (simultaneous rm -rf > largetree and cvs co src, both remote). A different part of the Lite/2 commit removed an explicit check for the 0xdeadb stuff in vget. Perhaps the kludge is still needed there. > > This problem really has little to do with nfs_inactive. What is > happening is a race between vgone and vget which would normally be solved > by the vnode locks. Since NFS doesn't have vnode locks, the race > happens. In my opinion, the problem has to do with marking objects as free and reusable while they are still in use. When the vnode is on the freelist, with 0 as v_usecount, and the vp->v_interlock is not locked, how should getnewvnode decide that the vnode is not reusable ? VOP_ISLOCKED ? Not currently used in getnewvnode nor in vget. > I am most of the way there in implementing the right solution for NFS > which is to used shared locks for NFS; vgone can then use the lock > manager to wait for all the shared locks to drain before recycling the > vnode. Good. - Tor Egge
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704041627.SAA07632>