Fix up panics when fork fails due to hitting proc limit
The function clearning credentials on failure asserts the process is a zombie, which is not true when fork fails. Changing creds to NULL is unnecessary, but is still being done for consistency with other code. Pointy hat: mjg Reported by: pho
This commit is contained in:
parent
0631de4a79
commit
edf1796d3e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=282567
@ -943,7 +943,8 @@ fork1(struct thread *td, int flags, int pages, struct proc **procp,
|
||||
#endif
|
||||
racct_proc_exit(newproc);
|
||||
fail1:
|
||||
crfree(proc_set_cred(newproc, NULL));
|
||||
crfree(newproc->p_ucred);
|
||||
newproc->p_ucred = NULL;
|
||||
fail2:
|
||||
if (vm2 != NULL)
|
||||
vmspace_free(vm2);
|
||||
|
Loading…
Reference in New Issue
Block a user