diff options
author | dchagin <dchagin@FreeBSD.org> | 2009-03-01 14:26:24 +0000 |
---|---|---|
committer | dchagin <dchagin@FreeBSD.org> | 2009-03-01 14:26:24 +0000 |
commit | 718161215b2752cb26fcd0d690010508dba62b11 (patch) | |
tree | 4542619a559bdb35c4b5cb3d34031f830f6dab80 | |
parent | f0deedaa01a918b016550320caf30b84a097bc87 (diff) | |
download | FreeBSD-src-718161215b2752cb26fcd0d690010508dba62b11.zip FreeBSD-src-718161215b2752cb26fcd0d690010508dba62b11.tar.gz |
Fix range-check error introduced in r182292. Also do not do anything
if all processors in the map are not available, simply return.
Approved by: kib (mentor)
MFC after: 1 week
-rw-r--r-- | sys/kern/subr_smp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/subr_smp.c b/sys/kern/subr_smp.c index 14d1297..c1bd50e 100644 --- a/sys/kern/subr_smp.c +++ b/sys/kern/subr_smp.c @@ -362,9 +362,11 @@ smp_rendezvous_cpus(cpumask_t map, return; } - for (i = 0; i < mp_maxid; i++) + for (i = 0; i <= mp_maxid; i++) if (((1 << i) & map) != 0 && !CPU_ABSENT(i)) ncpus++; + if (ncpus == 0) + return; /* obtain rendezvous lock */ mtx_lock_spin(&smp_ipi_mtx); |