kernel - Fix ptrace signal races between child and parent
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 27 Aug 2011 19:57:53 +0000 (12:57 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 27 Aug 2011 19:57:53 +0000 (12:57 -0700)
commit8c986a8224d4539e4ee66a3992966c7e2257a311
tree6a5e99556e5261f79b6205252f86d3be905d2119
parent9250f622e9a23a8ee21ddfbc5ffcf7acb3a889a9
kernel - Fix ptrace signal races between child and parent

* Fix several ptrace signal races which could cause the parent's wait()
  function to block forever (or until the parent is killed).  Generally
  speaking we have to use the process token to interlock the wakeup()/tsleep()
  sequence used by the ptrace code.

* Fix a MP race in the wait code, we must hold the child process's token
  when manipulating its p_flag field.

Reported-by: corecode, tuxillo
sys/kern/kern_exit.c
sys/kern/kern_sig.c
sys/kern/kern_synch.c