kernel - Fix proc_reparent() race/assertion panic
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 28 Nov 2012 18:21:38 +0000 (10:21 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 28 Nov 2012 18:21:38 +0000 (10:21 -0800)
commit55c81f71d1d24b9c7a6fa694b6d63d132cdba3b9
tree395a131c50c7ba87cc2e931a0e40d91ddf63878c
parentad8b2f335938160eb854e5c0c56e83e69a6727f2
kernel - Fix proc_reparent() race/assertion panic

* Fix proc_reparent() race/assertion panic.  p_pptr changes can race,
  and the procedure had an assertion for the case.  Recode the procedure
  to retry on a mismatch instead of assert.

* Also move the old-parent-wakeup code into the procedure so it is
  properly executed in all cases.

Reported-by: Peter Avalos
sys/emulation/linux/i386/linux_machdep.c
sys/emulation/linux/linux_emuldata.c
sys/kern/kern_exit.c
sys/kern/sys_process.c