git: kernel: Don't disturb about-to-be reaped zombies.

Matthew Dillon dillon at apollo.backplane.com
Mon May 30 00:35:56 PDT 2011


:Adding the process flag and using it is easy.  But to make those processes
:show up in the ps with P_REAPING set, you need to let sysctl_kern_proc()
:call sysctl_out_proc(p) on them while holding p->p_lock, which eventually
:breaks the assertion on kern_exit.c:901 (KKASSERT(p->p_lock == 0)).
:
:So, back to the original question in issue1996 (well, actually I asked that
:in the second post, not the first one :), can we simply drop this assertion
:(and let proc_remove_zombie() wait for p->p_lock to drop)?
:
:Best Regards,
:YONETANI Tomokazu.

    Yah.  I guess we do not need a flag as long as p_lock is waited for
    (again) just before the proc is removed from the list that allproc
    scans.

    Any existing p_lock waiting loops should be left where they are because
    they are protecting against a different case (incoming signals) which
    is interlocked against the process's state changing to SZOMB.

					-Matt
					Matthew Dillon 
					<dillon at backplane.com>





More information about the Commits mailing list