From owner-freebsd-emulation@FreeBSD.ORG Sat Aug 26 08:37:21 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9732216A4DA; Sat, 26 Aug 2006 08:37:21 +0000 (UTC) (envelope-from admin@intron.ac) Received: from intron.ac (unknown [210.51.165.237]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9F66C43D45; Sat, 26 Aug 2006 08:37:20 +0000 (GMT) (envelope-from admin@intron.ac) Received: from localhost (localhost [127.0.0.1]) (uid 1003) by intron.ac with local; Sat, 26 Aug 2006 16:37:19 +0800 id 00108801.44F0083F.0000DC13 References: <20060825084755.GA93151@stud.fit.vutbr.cz> <200608251028.55915.jhb@freebsd.org> <20060826080410.GA56721@stud.fit.vutbr.cz> In-Reply-To: <20060826080410.GA56721@stud.fit.vutbr.cz> From: "Intron is my alias on the Internet" To: freebsd-emulation@freebsd.org, freebsd-current@freebsd.org Date: Sat, 26 Aug 2006 16:37:19 +0800 Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312"; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Cc: Subject: Re: Linuxulator: Unbreak Mozilla, Firefox and RealPlayer X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Aug 2006 08:37:21 -0000 Divacky Roman wrote: > On Sat, Aug 26, 2006 at 10:07:17AM +0800, Intron is my alias on the Internet wrote: >> John Baldwin wrote: >> >> >On Friday 25 August 2006 04:47, Divacky Roman wrote: >> > >> >Umm, if you want to reparent a proc you should use the proc_reparent() >> >function instead of just hacking on p_pptr. You also need to hold >> >the proctree_lock when modifying p_pptr anyway. >> > >> >-- >> >John Baldwin >> >_______________________________________________ >> >freebsd-current@freebsd.org mailing list >> >http://lists.freebsd.org/mailman/listinfo/freebsd-current >> >To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" >> >> Thank you for your reminder. I have updated my patch: >> >> http://ftp.intron.ac/tmp/linux_machdep.c.1.53-2.diff > > this is wrong > > 1) you dont PROC_LOCK(p2) > > 2) you have to lock proctree_lock instead of allproc_lock > > are you satisfied with this patch? > > www.stud.fit.vutbr.cz/~xdivac02/linux-fix.patch This problem has confused me for a long time. The lock allproc_lock is more conservative than either p2->p_mtx or proctree_lock. It is the real protector of process tree. Actually, p2 should be protected from its birth to leaving the function linux_clone(). You may commit your patch to test. ------------------------------------------------------------------------ From Beijing, China