From owner-freebsd-current Sun Feb 9 5:24:58 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0041237B401 for ; Sun, 9 Feb 2003 05:24:56 -0800 (PST) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 2405F43FA3 for ; Sun, 9 Feb 2003 05:24:55 -0800 (PST) (envelope-from tmoestl@gmx.net) Received: (qmail 5310 invoked by uid 0); 9 Feb 2003 13:24:53 -0000 Received: from p508E6417.dip.t-dialin.net (HELO galatea.local) (80.142.100.23) by mail.gmx.net (mp022-rz3) with SMTP; 9 Feb 2003 13:24:53 -0000 Received: from tmm by galatea.local with local (Exim 4.12 #1) id 18hrUq-0000P6-00; Sun, 09 Feb 2003 14:27:48 +0100 Date: Sun, 9 Feb 2003 14:27:48 +0100 From: Thomas Moestl To: Tim Robbins Cc: Kris Kennaway , Morten Rodal , current@FreeBSD.org Subject: Re: Panic in fork() Message-ID: <20030209132747.GA638@crow.dom2ip.de> Mail-Followup-To: Tim Robbins , Kris Kennaway , Morten Rodal , current@FreeBSD.org References: <20030208092406.GA12104@rot13.obsecurity.org> <20030208110512.GB12696@rot13.obsecurity.org> <20030208141542.GC11725@slurp.rodal.no> <20030208151226.GB624@crow.dom2ip.de> <20030208220456.GB15257@rot13.obsecurity.org> <20030209143936.A2648@dilbert.robbins.dropbear.id.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030209143936.A2648@dilbert.robbins.dropbear.id.au> User-Agent: Mutt/1.4i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, 2003/02/09 at 14:39:36 +1100, Tim Robbins wrote: > On Sat, Feb 08, 2003 at 02:04:56PM -0800, Kris Kennaway wrote: > > > On Sat, Feb 08, 2003 at 04:12:26PM +0100, Thomas Moestl wrote: > > > > > addr2line will usually point to the first line of a statement if it > > > spans multiple lines; in this case, the full guard is: > > > > > > while (p2->p_pid == trypid || > > > p2->p_pgrp->pg_id == trypid || > > > p2->p_session->s_sid == trypid) { > > > > OK, I suspected that. > > > > tjr was looking into this last night and proposed the following patch: > > Alfred was the one who pointed out that holding proctree was probably > necessary, though :-) I don't really get why this is required - the pg_session pointer in struct pgrp is constant over the pgrp's lifetime, so for it to be invalid the wrong struct pgrp must be referenced; the p_pgrp pointer is protected by the process lock however, which is held for this check. - Thomas -- Thomas Moestl http://www.tu-bs.de/~y0015675/ http://people.FreeBSD.org/~tmm/ PGP fingerprint: 1C97 A604 2BD0 E492 51D0 9C0F 1FE6 4F1D 419C 776C To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message