From owner-cvs-all Wed Jan 24 10:46:54 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 906A037B404; Wed, 24 Jan 2001 10:46:20 -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 f0OIkCx28984; Wed, 24 Jan 2001 10:46:13 -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 f0OIjlY81577; Wed, 24 Jan 2001 10:45:47 -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: <20010124093655.W26076@fw.wintelcom.net> Date: Wed, 24 Jan 2001 10:45:47 -0800 (PST) Organization: BSD, Inc. From: John Baldwin To: Alfred Perlstein Subject: Re: cvs commit: src/sys/alpha/linux linux_machdep.c linux_sysvec Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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. -- 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