From owner-cvs-all Wed Jan 24 11:40:55 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 B675C37B69D; Wed, 24 Jan 2001 11:40:24 -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 f0OJeHx33440; Wed, 24 Jan 2001 11:40:17 -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 f0OJdpO82341; Wed, 24 Jan 2001 11:39:51 -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 11:39:51 -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-committers@FreeBSD.org, cvs-all@FreeBSD.org Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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? -- 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