From owner-cvs-all Wed Jan 24 11:45:11 2001 Delivered-To: cvs-all@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 889C137B404; Wed, 24 Jan 2001 11:44:47 -0800 (PST) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id f0OJil616677; Wed, 24 Jan 2001 11:44:47 -0800 (PST) Date: Wed, 24 Jan 2001 11:44:47 -0800 From: Alfred Perlstein To: John Baldwin Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/alpha/linux linux_machdep.c linux_sysvec Message-ID: <20010124114446.D26076@fw.wintelcom.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from jhb@FreeBSD.org on Wed, Jan 24, 2001 at 11:39:51AM -0800 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * John Baldwin [010124 11:40] wrote: > > On 24-Jan-01 John Baldwin wrote: > > > > On 24-Jan-01 Alfred Perlstein wrote: > >> * John Baldwin [010124 02:28] wrote: > >>> jhb 2001/01/24 02:26:13 PST > >>> > >>> Modified files: > >>> sys/alpha/linux linux_machdep.c linux_sysvec.c > >>> Log: > >>> Proc locking. > >> > >> This looks like another natural race condition: > >> > >> int p_sigparent; /* (c) Signal to parent on > >> exit. */ > >> > >> Can't int assignments be assumed to be atomic? > >> > >> + PROC_LOCK(p); > >> p2->p_sigparent = exit_signal; > >> + PROC_UNLOCK(p); > > > > Well, I b0rked that one (p2 not p). To fix the race, what probably > > should happen is what we do with kthreads in kthread_create: create > > the process with RFSTOPPED, and don't makea it runnable until we are > > done futzing around with it. > > How about something like > http://www.FreeBSD.org/~jhb/patches/linux.patch? Sure seems less evil. :) -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] "I have the heart of a child; I keep it in a jar on my desk." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message