kernel - Fix MP refcount race in struct pargs
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 16 Feb 2011 05:53:05 +0000 (21:53 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 16 Feb 2011 05:53:05 +0000 (21:53 -0800)
commit19bfc8aba97a2cdc7b0d822266cdb5ae5d2e9a80
tree6deb95ac8337643ec9aa4780af1c1e41c6ffc32c
parentbff1850cbe94ff3900efb21c70f33d614f3059ef
kernel - Fix MP refcount race in struct pargs

* Protect p->p_args with p->p_token.

* Protect pargs refcounts with sys/refcount.h.

* This fixes at least one memory corruption bug during heavy fork/exec/exit
  testing with fastbulk.

Testing-by: dillon, tuxillo
sys/kern/kern_exec.c
sys/kern/kern_fork.c
sys/kern/kern_proc.c