From owner-freebsd-hackers Wed Apr 9 14:36:06 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id OAA19557 for hackers-outgoing; Wed, 9 Apr 1997 14:36:06 -0700 (PDT) Received: from root.com (implode.root.com [198.145.90.17]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id OAA19550 for ; Wed, 9 Apr 1997 14:36:02 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by root.com (8.8.5/8.6.5) with SMTP id OAA22510; Wed, 9 Apr 1997 14:35:09 -0700 (PDT) Message-Id: <199704092135.OAA22510@root.com> X-Authentication-Warning: implode.root.com: localhost [127.0.0.1] didn't use HELO protocol To: Terry Lambert cc: ponds!rivers@dg-rtp.dg.com (Thomas David Rivers), hackers@freebsd.org Subject: Re: Some insight on "dup alloc" problems..... In-reply-to: Your message of "Wed, 09 Apr 1997 10:09:09 PDT." <199704091709.KAA07150@phaeton.artisoft.com> From: David Greenman Reply-To: dg@root.com Date: Wed, 09 Apr 1997 14:35:09 -0700 Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk ... >| vp = (struct vnode *) malloc((u_long) sizeof *vp, >| M_VNODE, M_WAITOK); > ************************************************* There are mutex locks in the callers of getnewvnode (specifically UFS) which force the calls to it to be single-threaded, preventing the vnode allocation race condition you are refering to. I know because I added them over a year ago: revision 1.24 date: 1995/07/21 03:52:40; author: davidg; state: Exp; lines: +34 -4 Implement a lock in ffs_vget to prevent a race condition where two processes try allocate the same inode/vnode, causing a duplicate. -DG David Greenman Core-team/Principal Architect, The FreeBSD Project