From owner-cvs-all Wed Jan 24 4:35:40 2001 Delivered-To: cvs-all@freebsd.org Received: from pike.osd.bsdi.com (unknown [204.216.28.222]) by hub.freebsd.org (Postfix) with ESMTP id 2D74137B699; Wed, 24 Jan 2001 04:35:16 -0800 (PST) Received: from foo.osd.bsdi.com (root@foo.osd.bsdi.com [204.216.28.137]) by pike.osd.bsdi.com (8.11.1/8.9.3) with ESMTP id f0OCZ3x08556; Wed, 24 Jan 2001 04:35:03 -0800 (PST) (envelope-from jhb@foo.osd.bsdi.com) Received: (from jhb@localhost) by foo.osd.bsdi.com (8.11.1/8.11.1) id f0OCYcn76757; Wed, 24 Jan 2001 04:34:38 -0800 (PST) (envelope-from jhb) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Wed, 24 Jan 2001 04:34:38 -0800 (PST) Organization: BSD, Inc. From: John Baldwin To: Bruce Evans Subject: Re: cvs commit: src/sys/isofs/cd9660 cd9660_vfsops.c Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org, Alfred Perlstein Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 24-Jan-01 Bruce Evans wrote: > On Tue, 23 Jan 2001, Alfred Perlstein wrote: > >> * John Baldwin [010123 16:26] wrote: >> > jhb 2001/01/23 16:26:19 PST >> > >> > Modified files: >> > sys/isofs/cd9660 cd9660_vfsops.c >> > Log: >> > Proc locking to protect p_ucred while we obtain additional >> > references. >> >> I really don't think you need the PROC_LOCK for these. >> >> You only need the 'uc' variable, and even then it's only to protect >> against rfork threads playing with setuid which is an inhernent >> race condition as p_ucred shouldn't be NULL. (afaik). > > I don't think you need any locking or crhold()ing for these. I think > xxx_mount() is only called with p == curproc, so p_ucred can't > change. > Unfortunately, most vfs and vnop interfaces including VFS_MOUNT() > make > it unclear that p == curproc by pretending to support arbitrary p's. Yes, Alfred and I talked this out over the phone today. I will be backing out these ucred changes and not committing any more of them. I'm also going to be revisiting calcru() very soon as well. >> Just give it some more thought, because I'm not sure I'm right >> about this. > > Me too. > > Bruce -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.Baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message