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
..
2015-07-20 09:37:42 +00:00
2016-01-09 01:56:46 +00:00
2016-01-27 19:55:02 +00:00
2015-12-23 03:34:43 +00:00
2015-11-19 05:50:22 +00:00
2015-07-29 17:18:27 +00:00
2016-01-26 21:24:49 +00:00
2016-01-21 01:09:39 +00:00