svn commit: r282567 - head/sys/kern
Mateusz Guzik
mjg at FreeBSD.org
Wed May 6 21:03:20 UTC 2015
Author: mjg
Date: Wed May 6 21:03:19 2015
New Revision: 282567
URL: https://svnweb.freebsd.org/changeset/base/282567
Log:
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
Modified:
head/sys/kern/kern_fork.c
Modified: head/sys/kern/kern_fork.c
==============================================================================
--- head/sys/kern/kern_fork.c Wed May 6 19:58:12 2015 (r282566)
+++ head/sys/kern/kern_fork.c Wed May 6 21:03:19 2015 (r282567)
@@ -943,7 +943,8 @@ fail:
#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);
More information about the svn-src-all
mailing list