Re: Linuxulator: Unbreak Mozilla, Firefox and RealPlayer

From: Intron is my alias on the Internet <mag_at_intron.ac>
Date: Sat, 26 Aug 2006 16:37:19 +0800
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_at_freebsd.org mailing list
>> >http://lists.freebsd.org/mailman/listinfo/freebsd-current
>> >To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_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
Received on Sat Aug 26 2006 - 06:37:21 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:59 UTC