Author: kib Date: Mon Oct 5 05:33:30 2015 New Revision: 288690 URL: https://svnweb.freebsd.org/changeset/base/288690
Log: MFC r288068: Ensure that maxproc does not exceed pid_max, at the time of boot. Modified: stable/10/sys/kern/subr_param.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/subr_param.c ============================================================================== --- stable/10/sys/kern/subr_param.c Mon Oct 5 05:24:16 2015 (r288689) +++ stable/10/sys/kern/subr_param.c Mon Oct 5 05:33:30 2015 (r288690) @@ -76,7 +76,7 @@ __FBSDID("$FreeBSD$"); #define NBUF 0 #endif #ifndef MAXFILES -#define MAXFILES (maxproc * 2) +#define MAXFILES (40 + 32 * maxusers) #endif static int sysctl_kern_vm_guest(SYSCTL_HANDLER_ARGS); @@ -261,6 +261,8 @@ init_param2(long physpages) TUNABLE_INT_FETCH("kern.maxproc", &maxproc); if (maxproc > (physpages / 12)) maxproc = physpages / 12; + if (maxproc > pid_max) + maxproc = pid_max; maxprocperuid = (maxproc * 9) / 10; /* _______________________________________________ svn-src-stable-10@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10 To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"