mjg 027c9d90e3 fork: plug a use after free of the returned process
fork1 required its callers to pass a pointer to struct proc * which would
be set to the new process (if any). procdesc and racct manipulation also
used said pointer.

However, the process could have exited prior to do_fork return and be
automatically reaped, thus making this a use-after-free.

Fix the problem by letting callers indicate whether they want the pid or
the struct proc, return the process in stopped state for the latter case.

Reviewed by:	kib
2016-02-04 04:25:30 +00:00
..
2016-02-04 03:55:41 +00:00
2016-02-03 14:31:23 +00:00
2016-02-04 03:55:41 +00:00
2016-01-26 15:12:31 +00:00
2016-02-04 03:55:41 +00:00
2016-02-04 03:55:41 +00:00