FreeBSD: initialize `mp_ncpus`.

Fix crash when executing `./sysctl -w kern.callout_stat=1`.
This commit is contained in:
logwang 2018-01-18 21:08:22 +08:00
parent a20feca0fb
commit e272b945ad
1 changed files with 1 additions and 1 deletions

View File

@ -109,7 +109,7 @@ static int sysctl_kern_smp_active(SYSCTL_HANDLER_ARGS);
/* This is used in modules that need to work in both SMP and UP. */
cpuset_t all_cpus;
int mp_ncpus;
int mp_ncpus = 1;
/* export this for libkvm consumers. */
int mp_maxcpus = MAXCPU;