Date: Wed, 6 May 2015 21:03:20 +0000 (UTC) From: Mateusz Guzik <mjg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282567 - head/sys/kern Message-ID: <201505062103.t46L3KdM035409@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201505062103.t46L3KdM035409>